closeCell
Stops editing the table cell which is in edit mode. Requires the incell edit mode.
When the user applies keyboard navigation,
tablemust be focused programmatically after callingcloseCell.
Parameters
isCancel Boolean optional
A flag which specifies whether to fire the cancel event. By default, the event is not fired.
Example - canceling cell editing
<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",
navigatable: true
});
var treeList = $("#treeList").data("kendoTreeList");
treeList.editCell(treeList.tbody.find("td").first());
setTimeout(function(){
treeList.closeCell();
treeList.table.focus();
}, 1500);
</script>
In this article