Ron Harlev
Ron Harlev

Reputation: 16703

How to programmatically page to next/prev page in jqGrid

Is there a jqGrid method that will skip to the next/prev page of rows. I was trying to programmatically click the button itself with jQuery, but didn't succeed yet

Upvotes: 5

Views: 11537

Answers (2)

Craig Stuntz
Craig Stuntz

Reputation: 126577

To go to page 123:

grid = $("#grid");
grid.setGridParam({
    page: 123
});
grid.trigger("reloadGrid");

NB: The grid behaves oddly if you go to a page for which there is no data.

Upvotes: 7

amernov
amernov

Reputation: 636

You can use $("#next").click(); to trigger next page.

Upvotes: -2

Related Questions