We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Input format for GridNumericColumn

I'm testing sfDataGrid.

There is Format property in GridNumericColumn of sfDataGrid but it works only for displaying value.

When I edit the column, it always show like 'xxxx.xx' (i,e 23457.00). I want to edit value as integer only.

How can I do it? 


1 Reply

SP Subburaj Pandian Veluchamy Syncfusion Team May 31, 2019 01:42 AM

Hi, 
  
Thank you for contacting Syncfusion support. 
  
Based on the provided information, if you need to edit the numeric column with the integer value, you can use the column’s NumericFormtInfo property and set NumberDecimalDigits as 0. Kindly refer the following code example for the same, 
 
//Set the NumberFormatInfo for the numeric column. 
sfDataGrid.Columns.Add(new GridNumericColumn() { MappingName ="ColumnName",  NumberFormatInfo = newSystem.Globalization.NumberFormatInfo() { NumberDecimalDigits = 0 }}); 
  
You can refer our User Guide documentation regarding the same,

 
 
Regards,
Subburaj Pandian V   


Loader.
Live Chat Icon For mobile
Up arrow icon