Hi,
i have a xamcomboeditor with items in binding with a collection, but user can also type the text in combobox. (IsEditable property set to true)
There is a way to bind user typed text whit a property of my modelview?
I've see that the typed text is stored in a private member texteditor of combobox.
Thank youAndrea
Andrea,
Depending on the type of collection your editor is bound to, you may want to try setting the editor's CustomValueEnteredAction to "Add".
Either in XAML as:
CustomValueEnteredAction="Add"
or in code:
this.xamComboEditor.CustomValueEnteredAction = Infragistics.Controls.Editors.CustomValueEnteredActions.Add;
Hi.I need to bind the typed text because the user can salect an item form combo but also type a custom text, and i need in booth case take the text show in combobox.
Actually I use a combobox with on top a normal text editor, the user con chose the item from dropdown and the item value is bind with my string propery con viewmodel and also type in the texteditor where the content propery is binb at the same string property on viewmodel.
Only in this way I could do this..Any other idea?
Tank youAndrea
If you use the approach I suggested in my previous post, you can bind the SelectedItem to your ViewModel after the entered items are added to the list.
Let me know if you have any questions.
Thanks,