The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team June 2, 2004 06:04 PM UTC
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 07:22 PM UTC
Thanks i tried few things and working fine.
I am having problem to do the following.
Q1
How would I change column width for a range of columns? I really don’t see any property in GridStyleInfo object.
Q2
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!
Thanks
ADAdministrator Syncfusion Team June 2, 2004 07:35 PM UTC