Hello,
I have a XamComboEditor whose ItemSource is bound to a list of KeyValuePairs. The DisplayMemberPath is bound to the value property, and the ValuePath is bound to the key. To give a specific example, there are two items in the list:
key=1 value="Debit"
key=-1 value="Credit"
What I want to do is programmatically set the value of the editor to 0 (i.e. not a valid value), have it display blank, and force the user to make a choice between the two valid selections. However, when I do this, the XamComboEditor displays "0". Am I missing something? Is there a way to get it to display blank in this case and give the user his two choices of Debit and Credit?
Thanks!
Bob
I have been looking into your post and if you use XAML XamComboEditor, you could set the ‘EmptyText’ property in order to prompt the users to select an item.
I am attaching a sample application(ComboEditorKeyValuePairs.zip) that shows my suggestion.
Let me know, if you need any further assistance on this matter.
Sorry, I neglected to say that I'm running v13.1. The 13.1 documentation says EmptyText is supported, but in reality it is not available. Does this feature require an upgrade to 13.2? Or is there another way to do it?
It looks to me like this control has some potentially useful features, but I have to figure out how to get by without a SelectedValuePath type of property. That complicates things a lot for my application; I really need to be able to bind the selected value to property in my viewmodel. Kinda frustrating that something that seems so basic (and that is in the WPF-specific version) isn't there already. Must invent a way around not having it only to have to undo it again when 14.1 comes out....
Thanks for your help.
Thank you for your reply. I have been looking into your scenario and currently the best approach could be to use the WPF specific XamComboEditor because this way you have the ability to bind its ’Value’ property. I am attaching a sample application(ComboEditorKeyValuePairs_WPFEditor.zip) this this editor.
Let me know, if you need any further assistance on this.
Which brings me back to the problem that prompted me to post originally... I also need the "EmptyText" (and for that matter "ItemTemplate"), which are available only in the XAML control.
I am just checking if you require any further assistance on the matter.
No, I suppose not. Thanks.