|
[Index.cshtml]
function actionBegin (args) {
if (args.requestType == "add") {
args.cancel = true; // Prevent the add action
}
} |
|
[Index.cshtml]
var hasPrevent = false;
function actionBegin(args){
if(args.requestType == “beginEdit” && !hasPrevent){
args.cancel = true; //prevent the editing
}
}
ajax.success: function(res){
var grid = document.getElementById('Grid')['ej2_instances'][0];
hasPrevent = true;
grid.startEdit(); // edit a selected row at manually
} |