Edit this page


Inserts a data item in the data source at the specified index.


index Number

The zero-based index at which the data item will be inserted.

model Object |kendo.data.ObservableObject |kendo.data.Model

Either a kendo.data.Model instance or JavaScript object containing the field values.


kendo.data.Model the data item which is inserted.

Example - insert a data item

var dataSource = new kendo.data.DataSource({
  data: [
    { id: 1, name: "Jane Doe" }
  schema: {
    model: { id: "id" }
dataSource.fetch(function() {
  var dataItem = dataSource.insert(0, { name: "John Doe" });
  var index = dataSource.indexOf(dataItem);
  console.log(index); // displays "0"
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article