cancelRow

Cancels editing for the table row which is in edit mode. Reverts any changes made.

Example - cancel editing

<div id="grid"></div>
<script>
  $("#grid").kendoGrid({
    columns: [
      { field: "name" },
      { field: "age" }
    ],
    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.addRow();

  setTimeout(function(){
    grid.cancelRow();
  }, 1000);
</script>
In this article
Not finding the help you need? Improve this article