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();
/* The result can be observed in the DevTools(F12) console of the browser. */
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
});
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(dataSource.pageSize()); // displays "1"
</script>