jqGrid paging question

后端 未结 1 708
北恋
北恋 2020-11-22 11:45

If you have 17 records and are displaying 15 at a time then when you\'re on page 2 you see records 16-17 of 17 - makes sense.

Now when you\'re on this second page an

相关标签:
1条回答
  • 2020-11-22 12:02

    You are right. It is an old problem. I used always before

    $("#list").setGridParam({page:1}).trigger('reloadGrid');
    

    but there is another way. The trigger 'reloadGrid' support additional options: 'current' and 'page'.

    $("#list").trigger("reloadGrid", [{page:1}]);
    

    will reset page to 1 in one step. The usage in the form

    $("#list").trigger("reloadGrid", [{current:true}]);
    

    allows to preserver current selection. You can of cause combine both options.

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