closeCell

Stops editing the table cell which is in edit mode. Requires "incell" edit mode.

When keyboard navigation is used, the Grid table must be focused programmatically after calling closeCell.

Parameters

isCancel Boolean optional

A flag specifying whether to fire the cancel event. By default the event is not fired.

Example - cancel cell editing

<div id="grid"></div>

<script>
$("#grid").kendoGrid({
    columns: [
        { field: "name" },
        { field: "age" }
    ],
    dataSource: [
        { name: "Jane Doe", age: 30 },
        { name: "John Doe", age: 33 },
    ],
    editable: "incell",
    navigatable: true
});

var grid = $("#grid").data("kendoGrid");

grid.editCell(grid.tbody.find("td").first());
setTimeout(function(){
    grid.closeCell();
    grid.table.focus();
}, 1500);
</script>
In this article