Disable CheckBox cell

Is there a way to disable a CheckBox cell in a GridBoundColumn? In other words, disable certain checkbox cells within the column while other checkbox cells are still enabled within the column. Guessing I tried these but no luck: this.dg[3, 0].Enabled = false; this.dg[3, 1].Control.Enabled = false; Thank you, Steve

2 Replies

AD Administrator Syncfusion Team September 10, 2004 08:53 PM UTC

You cannot explicitly set cell specific properties (other than style.CellValue or style.Text) in a GridDataBoundGrid. Instead you have to use either the grid.PrepareViewStyleInfo event or the grid.Model.QueryCellInfo event to dynamically set such properties. Here is a KB discussing setting specific cells to be ReadOnly. Setting style.Enabled = false would be similar. http://www.syncfusion.com/Support/article.aspx?id=10351


TS Todd Swygert September 13, 2004 04:45 PM UTC

Clay, Setting the Enabled property to false in QueryCellInfo worked perfectly. Thanks, Steve >You cannot explicitly set cell specific properties (other than style.CellValue or style.Text) in a GridDataBoundGrid. Instead you have to use either the grid.PrepareViewStyleInfo event or the grid.Model.QueryCellInfo event to dynamically set such properties. Here is a KB discussing setting specific cells to be ReadOnly. Setting style.Enabled = false would be similar. > >http://www.syncfusion.com/Support/article.aspx?id=10351

Loader.
Up arrow icon