Edit this page

pageSize

Gets or sets the current page size.

Parameters

size Number

The new page size.

Returns

Number the current page size.

Example - set the page size

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

Example - get the page size

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