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

GGC selected row color

Thread ID:

Created:

Updated:

Platform:

Replies:

76813 Sep 25,2008 05:21 AM UTC Sep 25,2008 10:33 AM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 25, 2008 05:21 AM UTC

Hi,

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


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

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;
}
else
{
e.Inner.Style.BackColor = Color.White;
}
}


Please let me know if this helps.

Best Regards,
Srirajan.


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

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:

http://websamples.syncfusion.com/samples/Grid.Windows/I37014/main.htm'>http://websamples.syncfusion.com/samples/Grid.Windows/I37014/main.htm">http://websamples.syncfusion.com/samples/Grid.Windows/I37014/main.htm

Kindly let me know if you need any further assistance.

Regards,
Subhasheela R





CONFIRMATION

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.

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

;