Increase divider width between cols in GridDataBoundGrid?

I want the nearest equiv of DataColumn.DividerWidth so that I can visually partition a single grid via thick dividers.

3 Replies

KO Ken Overton September 22, 2006 07:31 PM UTC

Sorry, I meant I want the equivalent of DataGridViewColumn.DividerWidth.


AD Administrator Syncfusion Team September 25, 2006 12:22 PM UTC

Hi Kov,

Please try the code below in the PrepareViewStyleInfo event, to see if this gives you what you needed.

// Form_Load
this.gridDataBoundGrid1.Model.Options.DefaultGridBorderStyle = GridBorderStyle.Solid;
this.gridDataBoundGrid1.Model.Properties.GridLineColor = Color.Silver;
this.gridDataBoundGrid1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(gridDataBoundGrid1_PrepareViewStyleInfo);

// PrepareViewStyleInfo event
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if( e.ColIndex > 0)
{
e.Style.Borders.Right = new GridBorder(GridBorderStyle.Solid, Color.Silver, GridBorderWeight.ExtraThick);
}
}


KO Ken Overton September 25, 2006 04:48 PM UTC

Great, thanks very much.

A minor nit: it''s too bad that we have to prescribe the gridlinecolor rather than letting it use the default.

Loader.
Up arrow icon