I found the problem in the demo:
the demo has loadonce:true
but clearly it should be loadonce:false
题
I am using jqgrid to reflect contents of a table in the DB. This table may have 1,000,000 records - and I wanted to use virtual scrolling.
So firstly, I tried using the demo
http://trirand.com/blog/jqgrid/jqgrid.html > New in version 3.7 > Virtual scrolling
I use the demo as is (and complemented the data needed).
However, it doesn't work as expected!!!
First, in the html part there are rowNum: 50 and rowTotal: 2000 but the server receives these two parameters in a GET request: rows=2000 totalrows=2000 and consequently, calculates there is only 1 page.
So I tried in the PHP code - ignore the request and act as if rows=50, however only 50 records are shown and when I scroll down, nothing happens, and the grid shows there are only 50 records total.
I also tried removing rowTotal from the HTML part, but that just led again to displaying only 50 records.
No matter what I tried, there is no real virtual scrolling - there is only one request towards the server.
By the way, I am using jqgrid - 4.5.4 with jquery 1.11.0. Thanks for any help you may have to offer.
Thank you.
解决方案
I found the problem in the demo:
the demo has loadonce:true
but clearly it should be loadonce:false