Jon Erickson Jon Erickson - 1 year ago 263
Javascript Question

jqGrid - How to remove the page selection on the pager but keep the buttons?

I want to remove the paging buttons on the grid, but I want to keep the add, edit, refresh, etc buttons on the bottom left. I don't want the pager there because I will be displaying all records in this particular grid implementation.

I want to keep what is in GREEN but remove what is in RED:

alt text

Currently, my solution is to empty out the center of the grid's navigation


But this means that the pager renders to the page, and then gets emptied, I'm wondering if I can just prevent it from even being rendered in the first place.

Answer Source

You can use my following JqGrid option to disable RED zone from JqGrid. It should be the best way to solve this question because you don't need to hack JqGrid rendering via CSS style sheet that be caused of problem if JqGrid change pattern for generating pager or you change pager id.

    rowList: [],        // disable page size dropdown
    pgbuttons: false,     // disable page control like next, back button
    pgtext: null,         // disable pager text like 'Page 0 of 10'
    viewrecords: false    // disable current view record text like 'View 1-10 of 100'