How to show all rows in the jqGrid?

后端 未结 14 1655
心在旅途
心在旅途 2020-12-02 22:26

jqGrid exposes a property rowNum where you can set the number of rows to display for each page. How do you set the grid to just display ALL rows?

Right

14条回答
  •  悲哀的现实
    2020-12-02 22:57

    If you have set the pagination on the navbar, you can also access to the total number of rows written on the right-bottom of the grid and then append to the generated RowList option.

    Do something like :

        // Get the total number of rows and delete space between numbers (Split the content of the div depending of the language (for me french)
    
    var val=jQuery("#pager_right div").text().split('sur')[jQuery("#pager_right div").text().split('sur').length-1].split(' ').join('');
    
        // And do the appending if the option isn't already added
    
    if(!$(".ui-pg-selbox option[value='"+val+"']").length > 0)
        jQuery(".ui-pg-selbox").append($('').val(val).html(val));
    

提交回复
热议问题