Does anyone know of a way to set up jqGrid to use a numeric pager?
Instead of Page 1 of 20, I want to have the paging be like 1,2,3,4 > >> and when I click on 4 it w
And here's one more possible solution.
It replaces the paging textbox with a list of links.
loadComplete: function() {
var grid = this;
var container = jQuery("#prev_jqGridTablePager").next().next();
jQuery(container).html('');
var totalPages = grid.p.lastpage;
for (var i = 1; i <= totalPages; i++) {
if (i == grid.p.page) {
jQuery(container).append("" + i + "");
} else {
jQuery(container).append("" + i + "");
}
}
jQuery(container).find("a.pagination").click(function(e) {
e.preventDefault();
var newPage = jQuery(this).text();
jQuery(grid).trigger("reloadGrid", [{ page: newPage }]);
});
}