You can also modify the color for individual grouping levels if you change
GridColumnDescriptor.GroupByAppearance.
For example, if you grouped by "Country" and "Region", you can change the formatting with
grid.TableDescriptor.Columns["Country"].GroupByAppearance.GroupCaptionCell.BackColor = Color.Green;
grid.TableDescriptor.Columns["Region"].GroupByAppearance.GroupCaptionCell.BackColor = Color.Blue;
Stefan
>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;
> }
>}
>
>