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.

How to specify a cell to be a percentage field?

Thread ID:

Created:

Updated:

Platform:

Replies:

20010 Oct 7,2004 01:00 PM Oct 7,2004 01:17 PM Windows Forms 1
loading
Tags: GridControl
Sassan Danesh
Asked On October 7, 2004 01:00 PM

I have defined a cell to have the following GridStyleInfo: info.Format = "0.0%"; info.CellValueType = typeof(double); The idea is to display percentages. This works apart from when the user wishes to update an existing value with a different one. The following example demonstrates the problem: 1. User originally typed ''2.2'' into the cell. 2. Cell displays ''2.2%'' 3. User double-clicks into the cell to edit the number. the text he is editing is ''2.2%'' 4. User changes the first 2 to a 3 and presses enter. ie the cell contains ''3.2%'' 5. Grid throws an exception stating ''3.2% is not a valid value for a Double'' Clearly the % character is causing the problem. Suggestions?

Administrator [Syncfusion]
Replied On October 7, 2004 01:17 PM

Here are a couple of forum threads that show different ways to tackle this problem. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17345 http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16888

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.

;