My server code is correct, and I was checking with Firebug. When I scroll out first set, first page is again requested. I will check again, but I don't know what could cause problems on the server side?
I think, I've found the solution. The problem was in using parseInt function instead of Math.ceil when determening current page. So line 277 of grid.base.js file should be page = Math.ceil((tbot + scrollTop) / div) + 1; instead of page = parseInt((tbot + scrollTop) / div) + 1;
It should be tested probably, but it seems that it works on my example.
Well, it fixed the problem for me. Please try it with td padding of 7px and grid's height of 530px. It should be pretty close to my test environment. I double checked my server side code, and it works ok.
edit: Also, I have rownumbers set on true, and they are repeated too, so it is not like server side is returning wrong data, but jqGrid simply repeats first page of results.
The problem seems to be that some (perhaps all) browsers are reporting fractional coords for the top of the table, even though top, padding, scrollTop etc are all integers. So the formula sometimes computes 1.9999999 when it should compute 2. Math.ceil is not the solution, because the same rounding errors could produce 2.00001 and Math.ceil would then compute 3. But Math.round should be good enough.
I'd still like to figure out where the fractional pixels are coming from – but for now Im pretty sure that Math.round will solve the problem.
Mark
Author
Replies
Viewing 11 replies - 1 through 11 (of 11 total)
The forum ‘Bugs’ is closed to new topics and replies.