Is it possible to somehow stop the cell from entering edit mode, when catching the event beforeCellEdit?
beforeEditCell: function (rowid, cellname, value, irow, icol) {
if (cellname != 'aSpecificCol')
return;
var grid = $("#grid");
if (aCondition == "something")
grid.setColProp('aSpecificCol', { editable: false });
else
grid.setColProp('aSpecificCol', { editable: true });
}
The event fires, but the setting of column property seems to not changing the edit mode.
The method
beforeEditCellwill be called in the middle of the editing process. It exist mostly to make some initialization in the new created input or select element.If you need prevent some cells from editing in the cell editing mode I cen suggest you either to set
"not-editable-cell"class in the cell sometimes before (for example incellattror inloadComplete) or usebeforeSelectRowto returnfalsefor some cells. ItbeforeSelectRowreturn false the cell will be not editing.