This question is locked. New answers and comments are not allowed.
I have a grid which uses ajax binding and InCell edit mode.
I'd like to selectively prevent certain rows from being edited based on a value of the underlying dataItem.
I'm already successfully hiding the edit/delete buttons using the OnRowDataBound client event and $(e.row).find(".t-grid-edit, .t-grid-delete").hide(); as per another post I found... however I can't see how to disable edit.
I'd considered doing something in the OnRowDataBound event as with the command buttons, but I not sure what to do to the row to make it read only. I have the same issue if I look at using RowAction, and I'm not even sure this would be an option for client side.
I looked at the OnEdit event, but it doesn't seem to have a preventDefault() method like OnDelete or OnSave do.
Ideally I want it so that when the user clicks in an editable cell on a row that matches a specific criteria (to do with values in dataItem), that the event is cancelled and nothing happens (i.e. cell does not go into edit mode), other cells would of course behave as normal.
I'd like to selectively prevent certain rows from being edited based on a value of the underlying dataItem.
I'm already successfully hiding the edit/delete buttons using the OnRowDataBound client event and $(e.row).find(".t-grid-edit, .t-grid-delete").hide(); as per another post I found... however I can't see how to disable edit.
I'd considered doing something in the OnRowDataBound event as with the command buttons, but I not sure what to do to the row to make it read only. I have the same issue if I look at using RowAction, and I'm not even sure this would be an option for client side.
I looked at the OnEdit event, but it doesn't seem to have a preventDefault() method like OnDelete or OnSave do.
Ideally I want it so that when the user clicks in an editable cell on a row that matches a specific criteria (to do with values in dataItem), that the event is cancelled and nothing happens (i.e. cell does not go into edit mode), other cells would of course behave as normal.