Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
True-Scrolling Bug with jqGrid 3.6.5
05/05/2010
19:03
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Hello!

After updating to the latest jqGrid release 3.6.5 I detected the following problem:

For all my tables using "true scrolling" (scroll:1) the table content is duplicated with each setGridHeight.
The Record info says: "View -9 – 2 of 2″.
Also when I scroll inside such a grid the records are duplicated.

When press the RESET-button, the records are loaded correctly (without any duplicates).

I'm using deepempty:true (but also tried with deepempty:false – without any change).

The calling order is:

1) setGridHeight
2) populateVisible
3) populate
It seems that the old data is not cleared!
Finally I found the bug:

@populateVisible: function()
* NOT-Working (3.6.5): if (ttop <= 0 &&  
  (p.lastpage===undefined||parseInt((tbot + scrollTop + div - 1) / div,10) <= p.lastpage))
* Fixed (as in 3.6.4):  if (ttop <= 0 &&
  (p.lastpage===undefined||parseInt((tbot + scrollTop + div - 1) / div,10) < p.lastpage))
with the update to 3.6.5 the "< p.lastpage" comparison changed to "<= p.lastpage" ... after reverting this to "< p.lastpage" the scrolling works again.
Kind regards,
Klaus.
06/05/2010
13:37
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thanks Klaus. This will fix your issue, but will go to the older one where the last page can not be requested.

Humm, will investigate more deeper the problem.

Best 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.

07/05/2010
10:13
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Hello Tony,

maybe you could improve this the following way ...

1) better validation/consistency checks: same rows (with same ID) should never be inserted into the grid - because this doesn't work anyway (selection of rows with same IDs is corrupt, ...)

2) better validation of paging values (esp. when in scroll-mode): sometimes it happens when scrolling too fast in a huge data set that the AJAX-loading-requests get in trouble (some not finished while invoking other ... or so) and the pages get mixed up or even the grid will stay sometime empty (when the paging is really corrupt and the grid tries to load a non-existing page)
... so loading negative pages won't work anytime and loading pages above the max also will not work.
... maybe you could also check when scrolled to the top to load page=1 and when scrolled to the bottom to load page="total" ... that may help the user to recover loading problems by simple scrolling to one end of the scrollbar.

Kind regards,
Klaus.

07/05/2010
11:28
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thank you for the recommendations.

This feature should be carfully checked and corrected.

Best 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.

01/07/2010
01:17
Avatar
toolm
Member
Members
Forum Posts: 5
Member Since:
30/06/2010
sp_UserOfflineSmall Offline

Hello.

I had the same problem with the newest version (3.7.1), and Klaus's solution worked fine.

Thanks.

01/07/2010
10:53
Avatar
jayarjo
Member
Members
Forum Posts: 17
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

@toolm, but as Tony said this will introduce new problem – last page won't be retrieved at all. Is this not true in your case?

I wasn't thinking of fixing this in such way at all. Initially I was planning to do a reset of some kind after a change in grid height, but didn't know what to reset and where? I was hoping that it is somehow possible to accomodate scroll size to a new height maybe…

What you guys think?

01/07/2010
11:41
Avatar
jayarjo
Member
Members
Forum Posts: 17
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

This has fixed my issue too, though. Tony, it does load the last page actually, but doesn't duplicate it any more. Were you meaning some different case?

02/07/2010
07:43
Avatar
toolm
Member
Members
Forum Posts: 5
Member Since:
30/06/2010
sp_UserOfflineSmall Offline

Yes. Everything works for me with Klaus's solution.

I tried some changes, and the case (which last page won't be retrieved) happened when I changed the line below.

// also in populateVisible function:

if (p.lastpage && page > p.lastpage) {

to 

if (p.lastpage && page >= p.lastpage) {

You can trigger the symptom with this change. I don't know if it helps, but just FYI.

Thanks

04/07/2010
10:46
Avatar
jayarjo
Member
Members
Forum Posts: 17
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

One thing that I think is also related to a scroll somehow.

I've got thousands of rows in my table and when they are all already preloaded (no additional auto load happens on scroll), I notice a slight delay when I try to move a scrollbar with the mouse. Scrollbar doesn't move for at least 2-3 secs, it looks like it is undergoing some intensive calculation. After it starts moving, scroll becomes smooth again. But if I release it and try to drag the scrollbar again, interface hangs for some time again.

When new rows are preloaded on scroll such delay maybe understandable, but I do not see why it can be happening when all rows are already loaded. This makes the interface to look a bit sluggish.

Anyone any idea of what can be the reason for this and how to eliminate it maybe?

05/08/2010
06:58
Avatar
wolis
Member
Members
Forum Posts: 5
Member Since:
22/02/2010
sp_UserOfflineSmall Offline

tony said:

Hello,

Thank you for the recommendations.

This feature should be carfully checked and corrected.

Best Regards

Tony


Just wondering what the progress on this bug is?

I found it still has not been addressed in the 3.8 demo so I have manually edited in 3.7.2 as per initial suggested fix and its all working ok (as far as I can tell).

For those wanting to hack the minified version.. just search for "===undefined||" and you will find a line with the same logic but (naturally) different veriable names eg:

c.lastpage===undefined||parseInt((s+p+h-1)/h,10)<=c.lastpage

Thanks

02/09/2010
18:16
Avatar
Ibrahim Aboshosha
New Member
Members
Forum Posts: 1
Member Since:
02/09/2010
sp_UserOfflineSmall Offline

try to replace the

C=Math.round((s+p)/h)+1; in populateVisible function with C2=Math.ceil((s+p)/h)+1;

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
35 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information