GridGroupingControl Change BackColor of Specific Row

Hi,
I have a GridGrouping Control, On Click of a button I want to change the BackColor of a specific Row say RowIndex 2.

2 Replies

HA haneefm Syncfusion Team October 5, 2007 02:47 PM UTC

Hi Arif,

You can try the code like this in the QueryCellStyleInfo event of the GridGroupingControl, to color any specific record(row) in grid.

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.RowIndex == 2)
{
e.Style.Themed = false;
e.Style.BackColor = Color.Pink;
}
}

Thanks for using Syncfusion Products.

Best regards,
Haneef


AE Arif Eqbal October 6, 2007 05:23 AM UTC

Hi Haneef,
Thanks for your reply.
Actually my problem is, I have to change the BackColor when User clicks on a Button on the window. Now I would not have this event fired at that time. So I was looking for some property to access the BackColor of a row.

Thanks
Arif

>Hi Arif,

You can try the code like this in the QueryCellStyleInfo event of the GridGroupingControl, to color any specific record(row) in grid.

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.RowIndex == 2)
{
e.Style.Themed = false;
e.Style.BackColor = Color.Pink;
}
}

Thanks for using Syncfusion Products.

Best regards,
Haneef

Loader.
Up arrow icon