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

How to format GridNumericColumn in SfDataGrid?

Platform: WinRT |
Control: SfDataGrid

In SfDataGrid, you can display the double type values by using the GridNumericColumn. By default, it loads TextBlock in Display mode and SfNumericTextBox in Edit mode. You can format the value of the GridNumericColumn by using its FormatString inbuilt property.

SfDataGrid provides string format support in GridNumericColumn as follows,

  • C - Column formats the value in CurrencyFormat.
  • N - Column formats the value in NumericFormat.
  • P - Column formats the value in PercentFormat.

With the help of the above string format, you can format the value of GridNumericColumn. You cannot explicitly specify the number of decimal places, decimal digits, group separator and group sizes in numeric value, when the above string format is specified on the GridNumericColumn’s FormatString property.


In WPF, you can achieve the above scenario by using NumerDecimalDigits, NumberDecimalSeparator, NumberGroupSeparator and NumberGroupSizes properties.


The following screenshot displays the GridNumericColumn called “AnnualIncome”, loaded without specifying the FormatString property.

Grid Numeric Column

Figure 1 : Default view of the GridNumericColumn

The following code example illustrates how to load the above GridNumericColumn with Currency format by using the FormatString property.


<!--GridNumericColumn with FomatString as currency format-->
<syncfusion:GridNumericColumn HeaderText="Annual Income" 

The above currency format is applied to GridNumericColumn as shown in the following screenshot.


Grid Numeric Column Currency Format

Figure 2 : GridNumericColumn with CurrencyFormat

When you want to display the value on GridNumericColumn by customizing its decimal places, decimal digits with the above currency format, you need to explicitly specify the format in FormatString property as shown in the following code example.


<syncfusion:GridNumericColumn HeaderText="Annual Income" 

The above format is applied to the value of GridNumericColumn as shown in the following screenshot.


Grid Numeric Column with Value

Figure 3: GridNumericColumn with specified numeic format


Sample Link:





You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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