Re-enabling pager buttons on JQGrid

前端 未结 1 1754
刺人心
刺人心 2021-01-15 10:17

I have a jqgrid with pager buttons that I want to customize and I would like to keep the buttons (next, forward, first and last) from being disabled once the grid is binded

1条回答
  •  执念已碎
    2021-01-15 10:25

    If you need to have the "Next" and the "Last" buttons of the pager enabled just because you don't know the number of records and the number of pages which you has you can do following:

    • place in the server response the total value at least one higher as the current requested page. For example: "page":1, "total":2.
    • modify pgtext and recordtext options of jqGrid (see the documentation). For example pgtext : "Page {0} of ..." and recordtext: "View {0} - {1} of ..." or just pgtext : "Page {0}" and recordtext: "View {0} - {1}"

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