AD
Administrator
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
KE
Ken
March 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.
Cheers
Ken