Edit this page

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();
  console.log(data.length);  // displays "1"
  console.log(data[0].name); // displays "John Doe"
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy