page Number

The page of data which the data source will return when the view method is invoked or request from the remote service.

The data source will page the data items client-side unless the serverPaging option is set to true.

Example - set the current page

var dataSource = new{
  data: [
    { name: "Tea", category: "Beverages" },
    { name: "Coffee", category: "Beverages" },
    { name: "Ham", category: "Food" }
  // set the second page as the current page
  page: 2,
  pageSize: 2
  var view = dataSource.view();
  console.log(view.length); // displays "1"
  console.log(view[0].name); // displays "Ham"
In this article
Not finding the help you need? Improve this article