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

How to specify a cell to be a percentage field?

Thread ID:

Created:

Updated:

Platform:

Replies:

20010 Oct 7,2004 05:00 PM UTC Oct 7,2004 05:17 PM UTC WinForms 1
loading
Tags: GridControl
Sassan Danesh
Asked On October 7, 2004 05:00 PM UTC

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 05:17 PM UTC

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.

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

;