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_Related Related Topics sp_TopicIcon
True scrolling and datatype function page load error
31/05/2010
17:36
Avatar
TranconVincent
New Member
Members
Forum Posts: 2
Member Since:
31/05/2010
sp_UserOfflineSmall Offline

i,

Thanks for the wonderfull jqgrid. it's very powerfull.

However, For some reasons, I have the following issue, and I hope you can help me with this.

I have a webmethod (JSON) returning 10432 records in total. I am not allowed to change the data returned from this webmethod, so I use the DataType function (thanks for this method!!).

In this function, I call the webmethod, construct an object with the required data like pages, records etc, and load it into the grid using addJSONData. so far, so good.

I enabled true scrolling by setting "scroll: 1″, and it looks perfect.

But: On page 6 (rowNum = 100) record information sais "view 1 – 600 of 10432.

If I continue to scroll to page 7, the Datatype function is called, requesting page 8, which is not what it should have asked, I think.

Record information now is "View 101 – 800 of 10 432″

The behavior of the grid is also quite strange, because the part of the grid you can see jumps to records with numbers like 500 etc. If I try to scroll down, pages 10, 12 and 14 are requested (why not the odd pages?), and the view of the data keeps jumping backwards although I scroll forward. If I finally reach the area containing row 600, I entirely miss rows 601 – 700.

Is this problem known to you?

Thanks for any response!

P.S. I just tested with version 3.7Beta, and the behavior is still the same if requesting the data page by page from the server using the Datatype function.

P.P.S.

I tracked down (part of) the issue to line number 798 of file grid.base.js.

Line sais: page = Math.round((tbot + scrollTop) / div) + 1;

If I investigate the point at which page 7 should be requested, and page 8 actually is, I can see the following:

tbot
286
scrollTop
14716
(tbot + scrollTop)/div
6.522608695652174
Math.round((tbot + scrollTop)/div) + 1
8

So, this issue comes down to a rounding issue, however, I am struggling which parameters/options I can modify to solve this rounding issue.

Could anyone please give me a hand?

01/06/2010
12:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks for investigations.

Also the scroll:1 is not supposed to work well with datatype function. There is a such discussion here.

Also could you please download the 3.7 beta from GitHub and test instead if the problem is fixed.

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/06/2010
13:14
Avatar
TranconVincent
New Member
Members
Forum Posts: 2
Member Since:
31/05/2010
sp_UserOfflineSmall Offline

I just downloaded the grid.base.js from GitHub, and saw that the line I told you about before, is moved to line number 277.

There indeed was a change in behavior: The row numbers are now listed without gap, however, the rowId which is requested to the datatype function still skips 7 (in my case), and after that, it will jump from 8 to 10 to 14 and so on.

Is there also another file in GitHub which could be of influence of this behavior?

If not, we will have to set scroll:0 again, and check for updates regularly, but that would decrease the neatness of our solution.

01/06/2010
13:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

HEllo,

As I say in my previous post

scroll:1 is not supposed to work with datatype function

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
26 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