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.
i find myself entering this code alot:
for (int i=0; i<_g.ColCount;i++)
{
_g[_g.RowCount,i].CellType = "Static";
_g[_g.RowCount,i].ReadOnly = true;
_g[_g.RowCount,i].BorderMargins = GridMarginsInfo.Empty;
_g[_g.RowCount,i].Borders.Bottom = GridBorder.Empty;
_g[_g.RowCount,i].Borders.Right = GridBorder.Empty;
}
is there anyway to do this for the entire row (or column) without having to loop through each cell
thanks,
ak
ADAdministrator Syncfusion Team July 22, 2005 05:49 PM UTC
Is _g a GridControl?
If so, you can set the styles for columns using the grid.ColStyles collection. You can set rowstyles using grid.RowStyles collection. If you want to set an arbitrary range of cells, you can use grid.ChangeCells.
//red column
grid.ColStyles[4].BackColor = Color.Red;
AKAdam K.July 22, 2005 05:58 PM UTC
thks
>Is _g a GridControl?
>
>If so, you can set the styles for columns using the grid.ColStyles collection. You can set rowstyles using grid.RowStyles collection. If you want to set an arbitrary range of cells, you can use grid.ChangeCells.
>
>
>//red column
>grid.ColStyles[4].BackColor = Color.Red;
>