SMART datagrid v.1 > Classes > GridView
The number of all pages when the grid view is in paging state.
If specify this value as -1, it will be automatically determined by the number of data rows and pageSize of grid. If specify a value greater than 0, this value will be specified as the number of pages regardless of the number of data rows. If it is in paging state in any cases, the value returned by this property will be the number of pages of actually being displayed. If not paging, it will return the value set by this property. You can specify together with other values through setPaging.
If actually change the number of pages, onPageCountChanged event will be fired. If set less than the number of existing pages, it will internally adjust pageIndex and fire onPageIndexChanged.
Defaults to 0.
grid.onPageCountChanged = function (grid, oldCount, newCount) {
var page = grid.pageIndex();
$('#btnFirst').prop('disabled', newCount <= 0);
$('#btnPrev').prop('disabled', newCount <= 0);
$('#btnNext').prop('disabled', newCount >= count - 1);
$('#btnLast').prop('disabled', newCount >= count - 1);
}