or
var oEditCell = kendo.ui.Grid.fn.editCell;var oInit = kendo.ui.Grid.fn.init;kendo.ui.Grid = kendo.ui.Grid.extend({ init: function () { oInit.apply(this, arguments); if (typeof this.options.beforeEdit === "function") { this.bind("beforeEdit", this.options.beforeEdit.bind(this)); } }, editCell: function (cell) { var that = this, cell = $(cell), column = that.columns[that.cellIndex(cell)], model = that._modelForContainer(cell), event = { container: cell, model: model, field: column.field }; if (model && this.trigger("beforeEdit", event)) { // don't edit if prevented in beforeEdit if (event.isDefaultPrevented()) return; } oEditCell.call(this, cell); }});kendo.ui.plugin(kendo.ui.Grid);