Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
630
XamComboEditor -- force user to make a selection
posted

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

Parents
  • 35319
    posted

    Hello,

     

    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.

    ComboEditorKeyValuePairs.zip
Reply Children