Paging function using Pagination.js library
This is an example of pagination using RealGrid’s features and the Pagination.js library. https://pagination.js.org/ (opens in a new tab)
function pagination() {
let container = $('#page');
container.pagination({
dataSource: dataProvider.getJsonRows();
pageSize: 8, // Number of data to display on one page
callback: function (data, pagination) {
gridView.setPage(pagination.pageNumber-1) // Page settings
}
})
}
function setPaging(){
var dataPerPage = 8; // Number of data to display on one page
gridView.setPaging(true, dataPerPage);
pagination()
}