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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Input format for GridNumericColumn

Thread ID:





144980 May 31,2019 05:16 AM UTC May 31,2019 09:42 AM UTC WinForms 1
Tags: SfDataGrid
Asked On May 31, 2019 05:16 AM UTC

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? 

Subburaj Pandian Veluchamy [Syncfusion]
Replied On May 31, 2019 09:42 AM UTC

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,

Subburaj Pandian V   


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon