I want to selectively disable checkboxes based on expression.
I add code to grid prerender to iterate through each GridDataItem and if condition met, I want to disable checkboxes for select column.
my aspx part:
my code behind
As soon as this code run, the one that had met conditions dissapear from the page, not just getting disabled.
If I change like:
I add code to grid prerender to iterate through each GridDataItem and if condition met, I want to disable checkboxes for select column.
my aspx part:
<Columns> <telerik:GridClientSelectColumn UniqueName="checkboxColumn"> </telerik:GridClientSelectColumn>foreach (GridDataItem item in radGrid.MasterTableView.Items){ if (item is GridDataItem) { for (int i = 1; i < renderedColumns; i++) { GridColumn column = radGrid.MasterTableView.RenderColumns[i]; Control control = item[column.UniqueName].Controls[0]; if (condition==true&&column.uniqueName=="checkboxColumn") { (control as CheckBox).Enabled=false; }As soon as this code run, the one that had met conditions dissapear from the page, not just getting disabled.
If I change like:
(control as CheckBox).Enabled=false; to say: (control as CheckBox).Tooltip="test"; checkboxes also dissapear.