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
60
How do I enable TwoWay Binding in UseAlternateBinding mode?
posted

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

Parents
No Data
Reply
  • 22015
    posted

    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.

Children