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.
Unfortunately, activation email could not send to your email. Please try again.

GridControl: Decimal places on cells with custom format

Thread ID:

Created:

Updated:

Platform:

Replies:

29051 May 16,2005 05:25 AM May 16,2005 05:58 AM Windows Forms 1
loading
Tags: GridControl
Roberto Obispo
Asked On May 16, 2005 05:25 AM

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 05:58 AM

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.

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.

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.

;