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

Using the TableControlCurrentCellActivating event to make the row a solid blue color when selected.

Thread ID:





96840 Oct 8,2010 08:57 PM UTC Oct 12,2010 05:26 AM UTC WinForms 3
Tags: GridControl
David Mecteaux
Asked On October 8, 2010 08:57 PM UTC

I copied a example from the knowledge base on making a whole row a solid blue color if the user clicks on one of its cell.

The code I copied is:
private void grdSavedPlans_TableControlCurrentCellActivating(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellActivatingEventArgs e)

e.Inner.ColIndex = 0;

This works great....but if you add a filter bar and allow filtering the blue bar will vanish if the user tries to filter. Is there a way to keep the blue bar there is the user uses the filter bar?

Jisha Joy [Syncfusion]
Replied On October 11, 2010 12:16 PM UTC

Hi David,

Please try this code snippet to highlight any record in grid.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
GridCurrentCell cc=this.gridGroupingControl1.TableControl.CurrentCell;
if(e.TableCellIdentity.RowIndex > 0 && e.TableCellIdentity.ColIndex > 0 && cc.HasCurrentCellAt(e.TableCellIdentity.RowIndex))
e.Style.BackColor = Color.Pink;
e.Style.TextColor = Color.SteelBlue;


David Mecteaux
Replied On October 11, 2010 03:06 PM UTC

That worked great!
Many thanks!

Jisha Joy [Syncfusion]
Replied On October 12, 2010 05:26 AM UTC

Hi David,

Thank you for your update.



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