The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team February 28, 2008 12:05 AM UTC
Hi Ken,
You can handle the QueryCellStyleInfo event and set the backcolor of the GroupCaptionCell. Below are the codes:
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { Element el = e.TableCellIdentity.DisplayElement; if (e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Caption) { int i = el.GetRowIndex(); e.Style.Themed = false; if( i %2 == 0) e.Style.BackColor = Color.Red; else e.Style.BackColor = Color.Blue; } }
Best regards, Haneef
KEKenMarch 3, 2008 09:00 AM UTC
Thanks Haneef that worked. The only minor issue with it was that as I'm using the Office look & feel that is built in, the group header stays the same colour. However, the rows are now alternate colours and I can live with that.