Forum
03:40
30/04/2010
Hi there,
I've been playing with the true scrolling grid, and the concept is awesome, however I think I've run into a bug that is a bit of a show-stopper. The grid works fine with data, however if the data set is empty (e.g. the user searches the data for something that doesn't have any matches), the grid gets stuck in an infinite loop of reloading.
This MAY be because I'm not returning the data as the grid is expecting.. I've tried returning an empty array with the total record/page indicators set to 0, as well as a false value, as well as record/page indicators set to 1, or false, etc.. nothing seems to solve the problem. My temporary solution is to return one empty record, however this is not ideal as it still allows one grid row to be selected.
As a side-note, I've also noticed that triggering a reloadGrid on a "true scrolling" grid makes the pager update to "no records found" even when there is data. The pager data is set correctly on the initial grid load, but not when reloaded.
Any suggestions? 🙂
Thanks!
21:31
Moderators
30/10/2007
Hello,
Thanks. I will cjheck this.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
09:31
Moderators
30/10/2007
Hello,
I can not reproduce this. I have try a diffrent combinations - including the build in search dialog and a cusyom form and the result is ok. I'm not sure, but could you please try the latest version in GitHub.
The only way to see what is happen is a link to the problem.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
00:07
30/04/2010
Hi Tony, Thanks for looking into this. I found the problem, I was setting a new height on the grid with setGridHeight in the gridComplete callback event, which was sending it into a loop when there is no data. I did not realize that the gridComplete event ran everytime the scroll position changed. Maybe it should just run the loadComplete callback and not the gridComplete event?
I've found another problem while I was trying to find this solution. setGridHeight works on the true scrolling grids if there is a large amount of data, but it behaves strangely with a small result set. I've made a test script to page this problem.
See here: http://mirrorbox.org/jqgrid.te.....t/?count=5
Click the "set height" button a few times and watch what happens.
The problem only occurs if the data set is smaller than the grid. Try it with a larger result set, and it will work fine:
http://mirrorbox.org/jqgrid.te.....?count=100
One other problem: if the total records is equally divisible by the requested number of records (e.g. the total records is 1000 and 100 records are requested), and the user scrolls to the end of the grid, jqgrid requests too many pages (e.g. it will request page 11 instead of page 10).
See here: http://mirrorbox.org/jqgrid.te.....count=1000
Immediately scroll all the way to the bottom of the grid, and the pager will update to "no records found". If you look at the request sent to the server, you'll see it requested page 11, when there are only 10 pages of data.
13:35
Moderators
30/10/2007
Hello,
Thank you very much for the exmples and investigations.
Also for the first issue - yes I see there is problem, but the purpose of scroll :1 is to have first scrollbar. I'm not sure that this can be fixed easy, rathrer this should be a developer decision.
For the second issue - try to set scrollOffset to 30/40 and see if this will fix the problem
Best Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
27 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