cellClose

Fires when the incell edit mode is used and the cell will be closed. The event is triggered after saving or canceling the changes but before the cell is closed. The event handler function context (available through the this keyword) will be set to the widget instance.

Event Data

e.container jQuery

The jQuery object that represents the edit container element. For more information, refer to the edit event arguments.

e.model kendo.data.Model

The data item to which the table row is bound.

e.type String

The type of the cell close action.

The supported types are:

  • save
  • cancel - Triggered when the TreeList keyboard navigation is enabled by navigateble: true and the Esc key is used for the close action of the cell.
e.sender kendo.ui.TreeList

The widget instance which fired the event.

Example - subscribing to the cancel event during initialization

<div id="treeList"></div>
<script>
  $("#treeList").kendoTreeList({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    dataSource: [
      { id: 1, parentId: null, name: "Jane Doe", age: 22, expanded: true },
      { id: 2, parentId: 1, name: "John Doe", age: 24 },
      { id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
    ],
    editable: "incell",
    toolbar:["create"],
    cellClose:  function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
      console.log(e.type);
    }
  });
  var treeList = $("#treeList").data("kendoTreeList");
  treeList.editCell($("#treeList td:eq(1)"));
</script>
In this article