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
240
Reset object to null
posted

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.