A question about using the reset button.
We have an object that the xammulticolumncomboeditor is bound to. The object has a couple of properties that we are using with the editor: a "name" of type string that we are using in the displaymemberpath, and an "id" of type int (non-nullable) that is used to identify the object as unique. When using reset on this object, it correctly sets the name to null, but it sets the id to 0. What we need is for it to null out the entire object. Is this possible? Or will I need to tackle this in a different way, maybe through a behavior? Another possibility to keep things simple would be to have the ability to set the id to -1, but I'm not convinced of that being the best way to handle this.
Hello nwnerd,
It sounds like what is happening in this case is that your reset button in the XamMultiColumnComboEditor is doing a member-wise clear of your underlying bound object, and since the "int" type is not nullable, it reverts back to it's default value of 0. One thing I am unsure of in this case, though, is what you actually have this object bound to in the XamMultiColumnComboEditor. I have tried on my end to reproduce this behavior that you are referring to by binding a custom object to the SelectedItem property of the editor and clicking the reset button, but this sets the underlying object to null on my end.
Would it be possible for you to please provide some additional information about your scenario regarding which property on the XamMultiColumnComboEditor you have your underlying object bound to? I have also attached the sample project I have used to test this, which shows the underlying object that the SelectedItem is bound to getting set to null, rather than doing a member-wise reset.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Hi Andrew,
Thanks for the reply. We had some other issues in our service that were causing the problem, so it turned out to be somewhat unrelated to the behavior of the box.
Thank you for your update. I am glad that you were able to resolve these issues that you were having with the XamMultiColumnComboEditor and that they were unrelated to the underlying behavior of the editor.