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
95
Columns created in code behind do not call ConvertBack in Converter
posted

Hi,

I have a xamgrid that is built with code behind columns.  They work fine, however if I use a Converter, the column never calls the ConvertBack() method, however the Convert() method does get called.

This may be because codebehind columns are defaulted to OneWay Binding, but I do not know how to set the binding mode in code behind.

If it is not the binding mode I don't know what could be causing this, any help would be appreciated.

Thanks,

Chad

Parents
No Data
Reply
  • 6759
    Offline posted

    Hi Chad,

    XamGrid's columns have two properties related to Converters and these are ValueConverter and EditorValueConverter. When a cell is not in edit mode the binding is one way and only the Convert method of the converter provided to ValueConverter is used. When a cell is in edit mode the converter provided to EditorValueConverter is used and in this case the binding is TwoWay an the ConvertBack method is used. 

    I suppose you have use only ValueConverter and that is why the ConvertBack method is not hit.

     

    Hope this helps,

Children