paste

Fired when the user pastes data using the Grid's built-in paste mechanism.

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

Event Data

e.items Array

The updated or added rows from the paste operation.

e.type String

The type of the paste operation—replace or insert.

e.sender kendo.ui.Grid

The widget instance which fired the event.

Example

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  toolbar: ["paste"], // Creates a dropdownlist that enables you to switch between replace and insert modes.
  columns: [
    { field: "name" },
    { field: "age" }
  ],
  dataSource: [
    { id:1, name: "Jane Doe", age: 30 },
    { id:2, name: "John Doe", age: 33 }
  ],
  allowPaste: true,
  navigatable: true,
  selectable: {
    mode: "multiple cell"
  },
  paste: function(e) {
      /* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(e.items, e.type);
  }
});
</script>
In this article