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
140
XamMaskedEditor not binding when used inside a XamGrid with a CustomColumn
posted

We had a requirement to use xammaskededitor inside a xamgrid . For this I   added a customcolumn  which has a displaycontrol as a textblock and the editor control as the Xammaskededitor control.

For some reason in edit mode , when the user empties the values for eg : no value ,  which is equivalent to "__/__/__" according to my mask the  under lying View model is not getting updated properyly. If i change it a valid value I can see the view model getting updated and the cell gets updated to the new value.But the problem comes when  the user wants to have an empty date value, the cell is retaining the old value because the view model newver gets updated in those scenarios?

I followed the apporach here to add the custom column to the grid.

http://blogs.infragistics.com/blogs/devin_rader/archive/2010/07/08/creating-custom-columns-for-xamgrid.aspx

To Reproduce:

1.Create a xamgrid.bind it to a view model

2. Add a customcolumn to the grid which has TextBlock as the displaycontrol and the XamMaskEditor as the editor control.Bind it two way to the view model.

3. When the user empties the text, the view model is not updated and the cell retains the old value.When the value is set to a valid  value it behaves properly.

(I also noticed that when the XamEditor is used as regular control on the form it behaves properly)

 

 

Parents Reply Children
No Data