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
720
XamGrid cell value edit
posted

Hi

I have a Xamgrid WPF control which displays one column bound to a view model. The column is bound to a double type field.

<ig:TextColumn Key="Value"
IsReadOnly="False"
ValueConverter="{StaticResource PercentConverter}">
The percent converter has the following code

double val = (double)value;
return val.ToString("P3");

All this works fine. I get the result as expected.

Now, the requirement is that this cell is editable and the users can update values. What is happening is that whenever I double click the cell to edit the cell does not show the converted value (in percentage) but the original value.
For eg. if the actual value was 0.0037 after applying the converter the value will be displayed in the grid as 0.37%. What I want is when the user double clicks the cell to edit I want to display 0.37 (without the percentage).

Any help appreciated.

Thanks

Parents Reply Children