Displaying numbers as integers

I dont know why but the numbers on the sfdatagrid display as numeric types. For example ID's show as 1.00 and not 1. How can i change this?


1 Reply

AA Arulraj A Syncfusion Team August 20, 2018 11:49 AM UTC

 
Thanks for contacting Syncfusion Support. 
 
You can change the number of decimal digits for the values in the numeric column by using the NumberFormatInfo.NumberDecimalDigits property. Please refer to the following code example and sample from the given location. 
 
Code Example: 
 
NumberFormatInfo numberFormatInfo = new NumberFormatInfo(); 
numberFormatInfo.NumberDecimalDigits = 0; 
this.sfDataGrid1.Columns.Add(new GridNumericColumn() { MappingName = "OrderID", HeaderText = "Order ID", NumberFormatInfo = numberFormatInfo }); 
 
 
 
Regards, 
Arulraj A 


Loader.
Up arrow icon