Edit this page

page

Gets or sets the current page.

Parameters

page Number

The new page.

Returns

Number the current page.

Example - set the current page

<script>
var dataSource = new kendo.data.DataSource({
  data: [
    { name: "Jane Doe" },
    { name: "John Doe" }
  ],
  pageSize: 1
});
dataSource.fetch(function() {
  dataSource.page(2);
  var view = dataSource.view();
  console.log(view[0].name); // displays "John Doe"
});
</script>

Example - get the current page

<script>
var dataSource = new kendo.data.DataSource({
  data: [
    { name: "Jane Doe" },
    { name: "John Doe" }
  ],
  pageSize: 1,
  page: 2
});
console.log(dataSource.page()); // displays "2"
</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