I am currently using the WPF 12.1 XamDataGrid and it is bound to a double value. My underlying data value is 499.997 and I need to preserve this value. However, when the datagrid displays the value it automatically rounds it to two decimal places thus resulting in 500.00 being displayed even when the underlying value is still 499.997.
Is there a way to preserve the original value in the data grid and provide more than 2 decimal places?
Any assistance would be greatly appreciated.
Hi Krasimir,
I have a question about masks. I would like to display numeric values (percents) in xamDataGrid column which is data binded to double. And I would like to display 100 for 100.00 and generally remove decimal point if it's not necessary. Why - because it works this way when regular DataGrid is used instead of xamDataGrid. As far as I understand, it's not possible to do it using mask, correct ?
Thanks,
Ed
Hello James,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Thank you for your post. I have been looking into it and you can control the precision of the double values in the XamDataGrid, by creating a style for the XamNumericEditor and set the Mask property to allow more than 2 digit after the decimal point. You can use the double mask to set 3 or more digits of precision. You can read more detains on the available masks here: http://help.infragistics.com/Doc/WPF/current/CLR4.0/?page=xamEditors_Masks.html. I have created a sample application for you, that shows how you can set the mask for the double fields with a style.
Please let me know if you need any further assistance on the matter.