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.
Hi
In my GDBG gird I am trying to make all the columns read-only by using the following code
foreach(GridBoundColumn col in dgRateClass.GridBoundColumns)
{
col.ReadOnly = true;
col.StyleInfo.BackColor = System.Drawing.Color.BurlyWood;
}
The first column of the grid is a check box but I can still check and uncheck it.
The above code is called from a clicked event of a button.
The code is changing the color but not making column read only
Please Help
GK
ADAdministrator Syncfusion Team September 30, 2005 09:31 AM UTC
Hi Gulshan
you can try with the following code to make the CheckBox column as readonly.
Assuming the Colindex of the CheckBox column as 1,
this.gridDataBoundGrid1.Model.ColStyles[1].ReadOnly = true;
Best Regards
Mouli.