Hi,
I recently upgraded to v14.2 of the XamDataGrid and noticed that the UnboundField class (which I used in all my grids) had been deprecated. Now I'm trying to refactor my grids to use non-deprecated fields but am having issues getting them to work in a TwoWay binding fashion.
I'm trying to use Numeric/Text/DateTime fields, all of them are in UseAlternateBinding mode as my source collection in the ViewModel uses a generic interface type and Name binding doesn't work. I'm finding that when I edit a value it only updates the cell, the new value is not pushed back into my source object, how do I make this happen?
I've tried specifying Mode=TwoWay on the binding I supply to the AlternateBinding property but this had no effect. I had a similar issue a couple of days ago whilst trying to use a converter, it's only when I provide a converter to the Converter property on the field it gets used so it appears that anything other than the Path is ignored by the AlternateBinding property. However, in this case there is no separate BindingMode property on the field that I can use.
Thanks
Hello Stephen,
Thank you for your post!
I have been looking into your issue and I have a couple of questions regarding your scenario: have you implemented the INotifyPropertyChanged interface in your Model and ViewModel?
Also would it be possible for you to provide me with a small isolated sample application, showing the functionality, that you are using and the issue, that appears?
Having this information would help me further investigate this issue for you and provide you with more information on this matter.
Looking forward to hearing from you.
Hi Gergana,
Yes I've implemented INotifyPropertyChanged in my model and view model. I've attached an isolated example as requested, if you run this then put a breakpoint in the setter of any property in the RowViewModel class you'll find that it doesn't get hit when you edit the corresponding cell in the grid.
Let me know if the problem isn't clear.
Regards,
Steve