can not make GDBG column read only

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

1 Reply

AD Administrator 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.

Loader.
Up arrow icon