pageSize Number

The number of data items per page. The property has no default value. Therefore, to use paging, make sure some pageSize value is set.

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

Example - set the page size

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