var topVisible = grid.getScrollProperty("top");
var rowHeight = grid.getRowHeight;
var pageStart = (topVisible == 0) ? 1 : Math.ceil(topVisible / rowHeight);
// frmSize() is a custom function that gets frame height. Grid height set to 100%
var rowsPerPage = Math.ceil(frmSize() / rowHeight);
var pEnd = pageStart + (rowsPerPage - 1);
var pageEnd = (pEnd > myData.length) ? myData.length : pend;
document.getElementByID('pageLabel').innerHTML = " " + pageStart + " - " + pageEnd + " of " + myData.length
var topVisible = grid.getScrollProperty("top");
var gridHeight = document.getElementById("grid-box").clientHeight;
var scrollHeight = grid.getScrollHeight();
var rowHeight = scrollHeight / myData.length;
var rowsPerPage = Math.floor(gridHeight / rowHeight) - 2; //account for header and scroll rows
var pageStart = (topVisible == 0) ? 1 : Math.ceil(topVisible / rowHeight) + 1; //account for header
var pEnd = pageStart + rowsPerPage;
var pageEnd = (pEnd > myData.length) ? myData.length : pEnd;
var pageNumber = (myData.length <= rowsPerPage) ? 1 : Math.ceil(pageStart / rowsPerPage);
document.getElementById('pageLabel').innerHTML = " " + pageStart + " - " + pageEnd + " of " + myData.length;
document.getElementById('pageDirect').innerHTML = "Page " + pageNumber;
This topic is archived.