ADAdministrator Syncfusion Team June 2, 2004 02:04 PM
In a GridControl, you can use grid.ChangeCells passing in a GridRangeInfo object and a style.
In a GridDataBoundGrid, you will have to loop through either grid.GridBoundColumns collection or the grid.Binder.InternalColumns collection, changing the GridBoundColumn.StyleInfo object for each column you want to change.
VIVivekJune 2, 2004 03:22 PM
Thanks i tried few things and working fine.
I am having problem to do the following.
How would I change column width for a range of columns? I really don’t see any property in GridStyleInfo object.
I am trying to put a “solid” black line at the top of some cell and using following code
GridStyleInfo style = new GridStyleInfo();
style.Borders.Top.Style = GridBorderStyle.Solid;
style.Borders.Top.Color = Color.Black;
style.Borders.Top.Weight = GridBorderWeight.Thick;
programGrid.ChangeCells(GridRangeInfo.Cells(1, 1, 1, 5), style);
But I am getting the following error messages:
''Syncfusion.Windows.Forms.Grid.GridBorder.Weight'' cannot be assigned to -- it is read only
How should I do that?
Please do reply!
ADAdministrator Syncfusion Team June 2, 2004 03:35 PM