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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

22113 Dec 3,2004 12:23 AM Dec 3,2004 10:01 AM Windows Forms 1
loading
Tags: Grouping
Lance Koh
Asked On December 3, 2004 12:23 AM

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 10:01 AM

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.

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.

;