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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Question about numeric formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,

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

Regards,

Sowndaiyan


CONFIRMATION

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.

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

;