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. Image for the cookie policy date
close icon

Changing the color of the row header indicator cell

Is there a way to change the color of the row header indicator cell (the one with the arrow in it) ? I wanted the row indicator cell to have a different background color for the current selected row so it stands out. Now the row indicator cell is always the same background as whatever the row or alternate row color setting.
I tried checking for the RecordRowHeaderCell in QueryCellInfo() and then using e.Style.BackColor and e.Style.cssClass (with background-color) but that did not work.

Is it possible to change the row header indicator cell ?

Thanks

1 Reply

LS Lingaraj S Syncfusion Team September 5, 2009 10:03 AM UTC

Hi Erlly,

Thank you for your interest in Syncfusion products.

If you want to change the BackColor for CuurentRecord row header cell, then please try using BackColor and Style properties in GridStyleInfo to achieve this behavior.

Refer the code below:

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.TableCellType==GridTableCellType.RecordRowHeaderCell
||e.TableCellIdentity.TableCellType==GridTableCellType.AlternateRecordRowHeaderCell)
{
if (this.gridGroupingControl1.TableControl.CurrentCell.RowIndex == e.TableCellIdentity.RowIndex)
{
e.Style.CellType = "Static";
e.Style.CellValue = ">";
e.Style.Font.Bold = true;
e.Style.BackColor = Color.LightGreen;
}
}
}


Please refer the sample from below link:
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/Forums/GGCRowHeader.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon