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. Image for the cookie policy date

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

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

1 Reply

AD Administrator Syncfusion Team 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");
		}
}

Loader.
Live Chat Icon For mobile
Up arrow icon