I have a radgrid with batch editing and a hidden column to decide if the row can be edited.
On the clientside in the OnBatchEditSetEditorValue I check this column and set the innerHTML if the row cannot be edtied.
The trouble is after clicking on a row which cannot be edited the edit control is no longer available on other rows.
function BatchEditSetEditorValue(sender, args) {
var itemContainer = args.get_container();
var editorValue = args.get_value();
var readOnlyRow = false;
if (args.get_row().control.get_dataItem()['readOnlyRow'] != undefined) {
readOnlyRow = args.get_row().control.get_dataItem()['readOnlyRow']
}
if (readOnlyRow) {
itemContainer.innerHTML = editorValue;
args.set_cancel(true);
}
}
Is there a better way or another event I could use to stop the cell going into edit mode?
Thankyou.