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

Don''t hightlight cell when selecting rows

Thread ID:





95070 Jun 18,2010 11:59 AM UTC Jun 23,2010 02:22 PM UTC WinForms 1
Tags: GridControl
Steve Catterall
Asked On June 18, 2010 11:59 AM UTC

I have a GridControl with ListBoxSelectionMode = SelectionMode.MultiExtended
When selecting rows the current cell (the cell the user clicks on) does not get the selection colour, and remains white.

Is there a way to turn this off, so the whole row gets highlighted when it is selected?

Christopher Issac Sunder K [Syncfusion]
Replied On June 23, 2010 02:22 PM UTC

Hi Stephen,

Thank you for your interest in Syncfusion products.

Highlighting the selected row including current cell can be achieved by handling the PrepareViewStyleInfo event. In the given sample, the AlphaBlendSelectionColor property gives us the selection color.

this.gridControl1.ListBoxSelectionMode = SelectionMode.MultiExtended;
this.gridControl1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(gridControl1_PrepareViewStyleInfo);
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell; //

void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
GridCurrentCell cc = this.gridControl1.CurrentCell;
if (e.RowIndex == cc.RowIndex && e.ColIndex == cc.ColIndex && !cc.IsEditing)
e.Style.BackColor = this.gridControl1.AlphaBlendSelectionColor; // get the selection color.

Please refer the following sample which illustrates the above.


Christopher K.


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