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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Active Row Indicator

Thread ID:





22048 Dec 2,2004 07:13 AM UTC Dec 2,2004 08:37 AM UTC WinForms 1
Tags: GridControl
Stuart Turner
Asked On December 2, 2004 07:13 AM UTC

Hi, I would like to be able to set up the grid so that in the first column of the grid a small triangle is shown if the currently selected cell is on that row. Excel does a similar thing but highlight the first column when a cell is selected on that row. I have "allow selection" set to none. Thanks.

Administrator [Syncfusion]
Replied On December 2, 2004 08:37 AM UTC

Actually, I think Excel colors the headers instead of showing an icon. But you can do either, coloring is a simpler as you do not have to manage an icon and draw it. You can use these events to handle colring teh current header row/col.
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
	if((e.ColIndex == 0 && e.RowIndex == this.gridControl1.CurrentCell.RowIndex)
		|| (e.RowIndex == 0 && e.ColIndex == this.gridControl1.CurrentCell.ColIndex))
		e.Style.BackColor = Color.Orange;
		e.Style.Themed = false; //so color works on themed headers
private void gridControl1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
If you want to use an icon, instead of PrepareViewStyleInfo, you can handle the CellDrawn event. There if it is a current row header, draw your icon. You would still need the CurrentCellMoved event to force the headers to be redrawn.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon