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

GridControl: Decimal places on cells with custom format

Hi, I''m having a problem with a decimal formatting. I want to show only 4 decimal places of a decimal number, using a custom format like "0.0000" or "#.####". It works perfectly over a Windows XP Pro, but when I run the same application on a Windows 2003 Server Standard, It shows 6 decimal places (all de decimal places I''ve stored, in fact). Do you have any idea of what might be happening? Thank you very much Roberto

1 Reply

AD Administrator Syncfusion Team May 16, 2005 09:58 AM UTC

One common reason formatting ''does not take'' is if the style.CellValueType for the column is string and not some numerical type like double or decimal. If you need to format sting values coming in from your database, then you can handle the QueryCellFormattedText. There you can explicitly set e.Text to be the formatted string you want to see based on e.Style.CellValue. You should also set e.Handled = true.

Loader.
Live Chat Icon For mobile
Up arrow icon