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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing the color of the row header indicator cell

Thread ID:

Created:

Updated:

Platform:

Replies:

89693 Sep 2,2009 04:41 PM UTC Sep 5,2009 10:03 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
ERLLY
Asked On September 2, 2009 04:41 PM UTC

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

Lingaraj S [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;