Edit this page

at

Returns the data item at the specified index. The index is zero-based.

Parameters

index Number

The zero-based index of the data item.

Returns

kendo.data.ObservableObject the data item at the specified index. Returns undefined if a data item is not found at the specified index. Returns a kendo.data.Model instance if the schema.model option is set.

Example - get a data item

<script>
var dataSource = new kendo.data.DataSource({
  data: [
    { name: "Jane Doe" },
    { name: "John Doe" }
  ]
});
dataSource.fetch(function(){
  var dataItem = dataSource.at(0);
  console.log(dataItem.name); // displays "Jane Doe"
  var dataItemWhichDoesNotExist = dataSource.at(3);
  console.log(dataItemWhichDoesNotExist); // displays "undefined"
});
</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