How to programmatically page to next/prev page in jqGrid

前端 未结 2 1485
Happy的楠姐
Happy的楠姐 2021-01-19 05:47

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

相关标签:
2条回答
  • 2021-01-19 06:05

    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.

    0 讨论(0)
  • 2021-01-19 06:10

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

    0 讨论(0)
提交回复
热议问题