how to remove pagination from jqGrid

If you set rowNum = -1 in jqGrid configuration options then it will display all records instead of dividing rows in no of pages. But this configuration keeps the pagination HTML as it is there in bottom or top toolbar. To remove it completely from jqGrid then we have to delete that HTML with help of jQuery and dom operations. Take a look at following code to remove the pagination from jqGrid completely.

jqGrid configuration Code

var jqGridObj = $('#'+tblId);

jqGridObj.jqGrid({  
            ....,
            ....,
            rowNum:-1,   // this loads all the records.
            ...
            ...
            other config options,
            gridComplete: function(){
              // this line removes the HTML of pagination 
              $('#pager'+jqGridObj[0].id+'_center').hide();
            },
            ..
         });

0 comments:

Post a Comment

Ask queries, report bugs, send enhancements and tips that you have experienced.

SHARE