I am using Xamdatagrid which is bound to some data. Currently the grid shows around 8 digits after decimal, What I want is that when I click the cell for edit mode it should show only 4 digits after decimal but it should not limit me when I try and enter digits.
For example: If the value is 14.52648 it should display 14.5264 but when I click and start editing it should allow me so while editing the cell will look like 14.526489561
I am using 15.1.20151.2008
Hello Neelesh, In order to display only 4 digits after the decimal point, an approach I can suggest you is to create a Style that is targeting the XamNumericEditor in the Resources of the XamDataGrid. Afterwards by setting the Format property of the editor to "###.0000" and reference it from the respective Field, you should be able to achieve the desired effect. <igDP:XamDataGrid.Resources> <Style x:Key="numericStyle" TargetType="{x:Type igEditors:XamNumericEditor}"> <Setter Property="Mask" Value="{}{double:4.8:c}" /> <Setter Property="Format" Value="###.0000" /> </Style></igDP:XamDataGrid.Resources> <igDP:NumericField Name="Price" EditorStyle="{StaticResource numericStyle }">Since the Mask property works directly with the Value of the editor, the PromptChars and the trailing zeros will be visible while the editor is in edit mode. If you require any further assistance on this matter, please do not hesitate to ask.
Unfortunately this doesn't seems to work.
Setting <Setter Property="Format" Value="###.0000" /> means that even if the value has not fraction part the grid still shows 0s. i.e 684 is now shown as 684.0000 which is not what I want, so for Format property 0.#### is apt as it shows what I need.
The issue is when I enter the edit mode. What I want is if my value is 54.56328745, then while editing I want to show the value as 54.5632 and also allow the user to enter more digits agter the decimal. This would mean the user can see 54.5632 but can change the value to 54.56323265.