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

Is there a way to get ColorEdit to always return in this format: #FF00CC?

Thread ID:

Created:

Updated:

Platform:

Replies:

22113 Dec 3,2004 05:23 AM UTC Dec 3,2004 03:01 PM UTC WinForms 1
loading
Tags: Grouping
Lance Koh
Asked On December 3, 2004 05:23 AM UTC

it appears that the color that is returned from the palette vary between: 1. #FF00CC 2. 0, 123, 65 3. teal i was wondering if there is a way for me to set it such that it will always return in #FF00CC format. thanks, lance

Administrator [Syncfusion]
Replied On December 3, 2004 03:01 PM UTC

try handling the TableControlDrawCellDisplayText event and formatting the value there.
private void gridGroupingControl1_TableControlDrawCellDisplayText(object sender, GridTableControlDrawCellDisplayTextEventArgs e)
{
		if(e.Inner.Style.CellType == "ColorEdit")
		{
			e.Inner.DisplayText = ((Color)e.Inner.Style.CellValue).ToArgb().ToString("X");
		}
}

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.

Please sign in to access our forum

or the page will be automatically redirected to 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

;