remove

Fired when the user clicks the "destroy" command button and delete operation is confirmed in the confirmation window, if the cancel button in the window is clicked the event will not be fired.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.model kendo.data.Model

The data item to which the table row is bound.

e.row jQuery

The jQuery object representing the current table row.

e.sender kendo.ui.Grid

The widget instance which fired the event.

Example - subscribe to the "remove" event during initialization

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: "destroy" }
  ],
  dataSource: {
    data:[
      { id: 1, name: "Jane Doe", age: 30},
      { id: 2, name: "John Doe", age: 33}
    ],
    schema: {
      model: { id: "id" }
    }
  },
  editable: true,
  remove: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Removing", e.model.name);
  }
});
</script>

Example - subscribe to the "remove" event after initialization

<div id="grid"></div>
<script>
function grid_remove(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log("Removing", e.model.name);
}
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { field: "age" },
    { command: "destroy" }
  ],
  dataSource: {
    data:[
      { id: 1, name: "Jane Doe", age: 30},
      { id: 2, name: "John Doe", age: 33}
    ],
    schema: {
      model: { id: "id" }
    }
  },
  editable: true
});
var grid = $("#grid").data("kendoGrid");
grid.bind("remove", grid_remove);
</script>
In this article