Adding button to jqGrid top toolbar

前端 未结 4 1709
梦毁少年i
梦毁少年i 2020-12-10 07:55

Looks like the default toolbar for jqGrid is always at the bottom. Buttons like Next/Prev page and the dropdown to select the number of rows per page will always show at the

4条回答
  •  醉话见心
    2020-12-10 08:18

    I upgraded to jqgrid 3.7.2, in hope that its toppager parameter would help. While it does put the paging controls to the top, the search button did not come along for the ride.

    // assuming a jqgrid with id='the_grid'
    $('#the_grid_pager_left').clone(true).insertBefore('#the_grid_toppager_center') 
    

    The above, with some minor CSS tweaking, copied the search/refresh buttons into the toppager as well, and preserved their events/behaviors.

提交回复
热议问题