Preventing editing a row in kendo grid?

Big.Bo0ody

New Member
I am usng kendo grid and while editing a row i am checking whther that row is editable or not.So how to make the selected row non editable if its not editable.I am doing the checking in \[code\]edit\[/code\] function of grid.Code\[code\]edit : function(e){ selectedRowIndex = $("#mygrid").data("kendoGrid").select().index(); if (selectedRowIndex >= 0) { var grid = $("#mygrid").data("kendoGrid"); var selectedItem = grid.dataItem(grid.select()); var slno = selectedItem.serial_no; if(slno!=0){ grid.cancelRow(); } } }\[/code\]But when i use this i am getting the following error in console.\[code\]Uncaught TypeError: Cannot call method 'delegate' of null \[/code\]Can somebody suggest a method to resolve it.Thank you.
 
Top