Checkboxes Working When AllowEdit = No

4 replies. Last post: June 18, 2010 11:49 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

I have a grid and depending upon the status of an invoice, I toggle the AllowAddNew and AllowEdit attributes in the LayoutSetting of my c# code. A couple of my grids have checkboxes. If I set AllowEdit to Edit.No the grid cells become non-editable (which they should) EXCEPT for checkboxes (ColumnType="CheckBox" and EditType="Checkbox"). I tried to put code in the OnCheckBoxClick even in Javascript to work around this but the code never fires if the AllowEdit is set to Edit.No (I guess you don't trigger the events anymore in this case). How can I make these checkboxes disabled or readonly. I have code that disables them in the OnRowSelect event (which always seems to fire regardless of the AllowEdit value) but it gives the checkboxes a disabled look while the others look enabled. I'd like ALL the checkboxes to look disabled if AllowEdit is set to Edit.No. Is this a bug in the WebGrid?

All times are GMT -5. The time now is 6:38 PM.
Previous Next