jQGrid how to correctly turn off paging

10,627

It's correct to place page and total to 1 and records to the total number rows. The setting rowNum: 100000000 seems to too large. If you will really post back from the server 100000000 rows of data the user will probably never see the grid. It seems enough to set rowNum to 10000.

If you don't use tree grid you can use local paging of data. In the case you need set just loadonce:true. In the case the server should post all the data to the client and just ignore the input rows parameter. Look at the demo which uses local data paging of 5000 rows of data here and compare the results with the same demo without local data paging here. The difference in the performance will show why I recommend you to use local data paging instead of scrolling the same data in the browser.

Share:
10,627
Joper
Author by

Joper

Updated on November 21, 2022

Comments

  • Joper
    Joper over 1 year

    So in order to do that i need to remove pager: value in grid declaration and i need to set maximum rows number to rowNum: 100000000,, according with that post How to show all rows in the jqGrid?

    But what about json which i need to return from server,

    var jsonData = new
                {
                    total = totalPages,
                    page = page,
                    records = totalRecords,
    
                    rows = ...
                }
    

    Which values better to assign to page and totalRecords in that case? Should i better pass them as zeroes or it is doesn't mater at all in such case?

    UPDATE:

    I think i would set records to total number rows that will go to jason, and page and total i will set to 1

    What do you think? Anymore i can do to correctly turn off jqGrid paging?

  • Joper
    Joper almost 13 years
    ok i will decrease the rowNum, by the way could you have look at this? stackoverflow.com/questions/6765741/…