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

GGC selected row color

Thread ID:





76813 Sep 25,2008 01:21 AM Sep 25,2008 06:33 AM Windows Forms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On September 25, 2008 01:21 AM


Is there a way to change the color of row which is selected in the GGC.

Sri Rajan [Syncfusion]
Replied On September 25, 2008 06:22 AM

Hi Avi,

Thank you for your interest in Syncfusion products.

You need to handle TableControlPrepareViewStyleInfo event and set e.Inner.Style property to change the color of the row when it is selected. Here is the code.

void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
if (e.Inner.RowIndex == cc.RowIndex)
e.Inner.Style.BackColor = Color.Yellow;
e.Inner.Style.BackColor = Color.White;

Please let me know if this helps.

Best Regards,

SubhaSheela R [Syncfusion]
Replied On September 25, 2008 06:33 AM

Hi Avi,

Thanks for your interest in Syncfusion product.

To change the color of selected cells or rows in GridGroupingControl, use the following code snippet:

this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.None;
this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any;
this.gridGroupingControl1.TableModel.Options.AlphaBlendSelectionColor = Color.Olive;

You can download the sample from the following page:


Kindly let me know if you need any further assistance.

Subhasheela R


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.

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.