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

colors for different grouping level

Thread ID:





31324 Jul 5,2005 06:24 PM UTC Jul 5,2005 07:13 PM UTC WinForms 1
Tags: GridControl
Faraz Haque
Asked On July 5, 2005 06:24 PM UTC

Hi, Is it possible to use different color for different grouping levels in a grouping grid. I use a caption summary grid, and if i have 3 grouping (summary) levels, each level has the same color. The actual record cells have a different color though. For example if i have a grid with Country , State , city and city population, if i add country and state as grouped cols, and summarize city population, I will get country total and state totals in the same color. I need this to be a bit different. Any help would be great.

Administrator [Syncfusion]
Replied On July 5, 2005 07:13 PM UTC

So you have summaries in the group caption row? If so, you can try using QueryCellStyleInfo to color the different levels. Here is code that colors level 1.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
	if(e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
		GridCaptionRow caption = e.TableCellIdentity.DisplayElement as GridCaptionRow;
		if(caption.ParentGroup.GroupLevel == 1)
			e.Style.BackColor = Color.LightGoldenrodYellow;


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