Hi,
I have set .DisplayMemberPath="FullName" on one of my XamComboEditor control.
If I select any item of the drop down list then this gets properly displayed (using the "FullName") property. However, if I assign an object to the .Value property, then the "FullName" property is not accessed but the object is rendered using the .ToString() method.
Is that expected?
Thanks for your feedback. I'll get back to you in case
Hello,
I believe that you need to set the editor's ValuePath property to be the name of the property that uniquely identifies the Item. Then, when you set the editor's Value property, instead of setting it to an Item object, you set it to that property which you had identified as the ValuePath property.
Please see the attached sample that demonstrates what I tried to describe. A XamComboEditor is bound (in the code-behind) to an ObservableCollection of Category objects. The ValuePath is set to the CategoryID. The DisplayMemberPath is set to CategoryName. When setting the Value, you can set it to Category.CategoryID, and not simply to an object of type Category.
I hope this helps.
Thanks,