Forum
17:24
27/07/2011
Hi,
We are using the virtual scrolling feature of jqgrid. Everything works fine with version 3.6.4. When we upgrade to 3.8.1 or the latest 4.1.2 we see the issue.
The issue: The scrolling continues past the last row of our data and keeps repeating the last row in the grid.
If our dataset from the server contains a round number of rows, meaning the last page cotains the rownum amount defined in the grid, the grid performs properly. It stops trying to retrieve from the server at the last row as expected. But If our dataset from the server contains a "left over" amount of rows, meaning the last page has less than the requested amount (rowNum defined in the grid) if continues to try to retrieve even though there is no more data. Our grid definition:
$("#searchResultMaster").jqGrid({ scroll: 1, url:'/ims/IndividualsSearch/loadRemainingData.action?sid=' + Math.random(), datatype: "json", mtype: "GET", colNames : ['First Name','Middle Name','Last Name','Indv ID','hidden'], colModel : [{name :'first_nm',index :'first_nm',align :'left',width :100}, {name :'middle_nm',index :'middle_nm',align :'left',width :100}, {name :'last_nm',index :'last_nm',align :'left',width :100}, {name :'indv_id',index :'indv_id',align :'left',width :80,hidden:true}, {name :'forIndvMOE',index :'forIndvMOE',align :'left',width:100,hidden:true} ], width :930, loadtext:" Loading Search Result, Please wait .... ", height :300, rowNum:30, altRows:true, altclass:'myAltRowClass', shrinkToFit :false, multiselect: true });
In this case we have 31 total records. As you can see above rownum is set to 30.
The first JSON String returned:
{"page":"1","total":"2","records":"31", "rows" : [{"id":"0003284854","cell":["Jane","A","Doe","0003284854"]},
{"id":"0003284856","cell":["Jane1","A","Doe","0003284856"]},
{"id":"0003284857","cell":["Jane2","A","Doe","0003284857"]},
{"id":"0003284858","cell":["Jane"3,"A","Doe","0003284858"]},
...snip... 30 total rows returned.
{"id":"0003284858","cell":["Jane"3,"A","Doe","0003284858"]},
]}
This is the last record in the data set and the grid keeps requesting it on scrolling:
{"page":"2","total":"2","records":"31", "rows" : [{"id":"0003284810","cell":["John","A","Doe","0003284810"]}]}
This works fine with jqGrid 3.6.4, but doesn't work in 3.8.1 and 4.1.2. Did something change?
Thanks
Carmine
Most Users Ever Online: 715
Currently Online:
52 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66