I've got the following code to change the page of the Jqgrid.
function setPage() {
$('#editGrid').setGridParam({ page: 10 }).trigger('reloadGrid');
alert("Success");
}
I get the success message but the page wont change. Currently I run the function in the loadcomplete section of the grid.
Any help would be appreciated.
The .trigger('reloadGrid') will reload the grid to page 1. So you did setGridParam({page:10}) but then right after .trigger('reloadGrid') refreshed the grid to page 1.
To set the grid to page 10 do this:
$("#editGrid").trigger("reloadGrid",[{page:10}]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With