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

GridControl: Decimal places on cells with custom format

Thread ID:





29051 May 16,2005 09:25 AM UTC May 16,2005 09:58 AM UTC WinForms 1
Tags: GridControl
Roberto Obispo
Asked On May 16, 2005 09:25 AM UTC

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

Administrator [Syncfusion]
Replied On 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.


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