New to Kendo UI for jQueryStart a free 30-day trial

IndexOf

methods

Gets the index of the specified data item.

Parameters:dataItemkendo.data.ObservableObject

The target data item.

Returns:Number

—The index of the specified data item. Returns -1 if the data item is not found.

<script>
var dataSource= new kendo.data.DataSource({
  data: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
  ]
});
dataSource.fetch(function() {
  var dataItem = dataSource.at(0);
  var index = dataSource.indexOf(dataItem);
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(index); // displays "0"
});
</script>
Not finding the help you need?
Contact Support