ggc row-header selection back-color

Hi,

I'm using a GridGroupingControl and I noticed that the default back-color of rows that are selected via the row-header is Black and I wish to set it to White.
How do that ?


Thanks in advance.

3 Replies

HA haneefm Syncfusion Team April 2, 2007 05:36 PM UTC

Hi Ryan,

The selection color cannot be applied different to only a single column(RowHeader). Rather you can handle the QueryCellStyleInfo event to change the TextColor and BackColor properties to achieve the required look and feel of a particular column in the grid without using the selections. Or you can also handle the TableControlCellDrawn event to achieve this.

If you want to change the selection color in a grid, you need to set the TableOptions.SelectionBackColor property to new color.

this.grid.TableOptions.SelectionBackColor = Color.Red;

Best regards,
Haneef


RH Ryan Hardoon April 4, 2007 08:05 AM UTC

Hi Haneef,

I guess I wasn't clear enough.
I was talking about the fore/back-colors of rows marked-for-deletion via the row header.

I could find no appropriate property under "Appearance", "TableOptions" or any other category that seemed relevant.


Best regards


HA haneefm Syncfusion Team April 4, 2007 10:17 PM UTC

Hi Ryan,

Issue 1: Selection BackColor on CellBased Selection techinque.

You can use the AlphaBlendSelectionColor property to change the selection back color in a grid.

this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any | GridSelectionFlags.AlphaBlend;
this.gridGroupingControl1.TableModel.Options.AlphaBlendSelectionColor = Color.Red;

Issue 2: Selection TextColor on CellBased Selection techinque.

You can handle the TableControlPrepareViewStyleInfo event to change the TextColor properties to achieve the required look and feel of a selected rows in the grid using the Model.SelectedRange property. Or you can also handle the TableControlCellDrawn event to achieve this.

Best regards,
Haneef

Loader.
Up arrow icon