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

GridGroupingControl question

Thread ID:





76805 Sep 24,2008 09:18 PM UTC Sep 29,2008 12:59 PM UTC WinForms 1
Tags: GridControl
Asked On September 24, 2008 09:18 PM UTC


I am working on this control. I had few questions related with control. Hopefully you will be able to answer them.

1. If I want to change the color of the selected row in this control how should I do that. Default it is showing me orange color. I would like it to change to blue
2. If I want to change the text color of elements in the selected row , how do I do that. Default color it is showing me white. I would like it to turn to black .
3. The group header when clicked turns to color black. Is it possible to change the color of it?

Are there any properties or functions I need to setup?


Nisha Arockiya A [Syncfusion]
Replied On September 29, 2008 12:59 PM UTC

Hi Anuvrat,

Thanks for your interest in Syncfusion Products.

Query 1:

You have to include the Alphablend flag in the Allowselection property. To control the selection color better, you can turn off the color in alhablend selection color and handle PrepareViewStyleInfo.
Here is some code snippet:

// In Form Load
this.gridGroupingControl1.TableModel.Options.AlphaBlendSelectionColor = Color.FromArgb(0,0,0,0);
this.gridGroupingControl1.TableModel.Options.AllowSelection = (Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Row | Syncfusion.Windows.Forms.Grid.GridSelectionFlags.AlphaBlend);

// PrepareViewStyleInfo
private void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
if(this.gridGroupingControl1.TableControl.Selections.Ranges.AnyRangeContains(GridRangeInfo.Cell(e.Inner.RowIndex, e.Inner.ColIndex)) && !this.gridGroupingControl1.TableControl.CurrentCell.IsEditing) e.Inner.Style.BackColor = Color.Blue;

Query 2:

Handle the same PrepareViewStyleInfo as above and set the text color of the selected row.
e.Style.TextColor = Color.Black;

Query 3:

Inorder to change the color or the group header,Please try this code snippet and let us know if this helps.

private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)

Please let me know if this helps.



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