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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Question about numeric formatting

Thread ID:





121824 Jan 28,2016 03:48 PM UTC Jan 29,2016 10:41 AM UTC WPF 1
Tags: SfDataGrid
Asked On January 28, 2016 03:48 PM UTC


I have a datagrid where I have a GridNumeriColumn that represents a distance.

I would like to have the following requisites on this column but I'm not able to obtain them:

1) If the number does have decimals I would like they are not shown even if I put NumberDecimalDigits="2".
    For example, if the user types 1000, I would like 1000 is displayed, but if he types 890.18, I would like 890.18 is displayed.

2) I would like the current unif of measure is displayed after the number, even if the user can't modify it (as it happens for example for '%' for percentage columns).
    For example I would like the column shows "1000 mm", "890.18 mm" and so on.

Can you help me ?

Sowndaiyan Paulpandi [Syncfusion]
Replied On January 29, 2016 10:41 AM UTC

Hi Silvio,

Thanks for contacting Syncfusion Support.

In SfDataGrid , You can achieve your requirement with the help of the IValueConverter in the DisplayBinding property and format the display of the GridNumericColumn. We have prepared a sample as per your requirement and you can download the same form the below location. In this sample the converter is invoked for each cell in the GridNumericColumn and the display format can be customized.

Sample : http://www.syncfusion.com/downloads/support/forum/121824/ze/GridNumericColumn_Format1290330637




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

or the page will be automatically redirected to 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