remove

Removes the specified data item from the data source.

Parameters

model kendo.data.Model

The data item which should be removed.

Example - remove a data item

<script>
var dataSource = new kendo.data.DataSource({
  data: [
    { id: 1, name: "Jane Doe" },
    { id: 2, name: "John Doe" }
  ],
  schema: {
    model: { id: "id" }
  }
});
dataSource.fetch(function() {
  var dataItem = dataSource.at(0);
  dataSource.remove(dataItem);
  var data = dataSource.data();
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(data.length);  // displays "1"
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(data[0].name); // displays "John Doe"
});
</script>
In this article