As an example of a sample extend operation, take a look at this link: Make cell readonly in Kendo Grid if condition is met
Using the following code will cause AngularJS to throw the error at the end of this post:
This code will cause the following error in AngularJS:
Error: [$compile:multidir] Multiple directives [kendoGrid, kendoGrid] asking for 'kendoGrid' controller on: <div kendo-grid="">
http://errors.angularjs.org/1.2.15/$compile/multidir?p0=kendoGrid&p1=kendoGrid&p2='kendoGrid'ontroller&p3=%3Cdiv%20kendo-grid%3D%22%22%3E
Using the following code will cause AngularJS to throw the error at the end of this post:
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);This code will cause the following error in AngularJS:
Error: [$compile:multidir] Multiple directives [kendoGrid, kendoGrid] asking for 'kendoGrid' controller on: <div kendo-grid="">
http://errors.angularjs.org/1.2.15/$compile/multidir?p0=kendoGrid&p1=kendoGrid&p2='kendoGrid'ontroller&p3=%3Cdiv%20kendo-grid%3D%22%22%3E