Grouping Grid Borders Color

Hello
How do i Change the color of the borders
in a gridGrouping Grid?

1 Reply

JJ Jisha Joy Syncfusion Team May 25, 2010 08:59 AM UTC

Hi Jony,

In GridGroupingControl control you need to handle QueryCellStyleInfo to apply styles to the cell. Please see the following code that hows how to set borders in cells.


this.gridGroupingControl1.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);


void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.ColIndex ==3 && e.TableCellIdentity.RowIndex ==4)
e.Style.Borders.All = new GridBorder(GridBorderStyle.Solid, Color.Beige,GridBorderWeight.ExtraThick);
}

Thanks,
Jisha

Loader.
Up arrow icon