Edit this page


Gets the total number of data items. Uses schema.total if the transport.read option is set.


Number the total number of data items. Returns the length of the array returned by the data method if schema.total or transport.read are not set. Returns 0 if the data source hasn't been populated with data items via the read, fetch, or query methods.

Example - get the total number of data items

var dataSource = new kendo.data.DataSource({
  data: [
    { name: "Jane Doe", age: 30 },
    { name: "John Doe", age: 33 }
dataSource.fetch(function() {
  console.log(dataSource.total()); // displays "2"
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article