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?
07/03/2010
23:27
Avatar
monoclast
Cedar Park, TX, USA
Member
Members
Forum Posts: 12
Member Since:
08/02/2010
sp_UserOfflineSmall Offline

Hello,

I previously asked about how to get true scrolling to work in this forum thread:

jqGrid Forum Post

But now I see true scrolling still does not seem to work correctly! Frown 

jqGrid seems to stop loading after 402 rows in my test case, which is quite strange!

I have detailed the test case on this web page (code & database are provided for download too):

jqGrid Test

I would appreciate any help you might be able to offer, even just confirmation that this is a bug in jqGrid!

08/03/2010
01:44
Avatar
monoclast
Cedar Park, TX, USA
Member
Members
Forum Posts: 12
Member Since:
08/02/2010
sp_UserOfflineSmall Offline

Also, I just noticed that the documentation for the PHP file appears to be incorrect as well. It shows these elements in the generated XML:

records: the total records from the query

total: the total pages in the query

In the sample code on the same page, they show:

$s .= "<records>" . $count . "</records>";

$s .= "<total>" . $total_pages . "</total>";

But in this forum post, I was instructed to swap these values like so:

$s .= "<records>" . $totalpages . "</records>n";

$s .= "<total>" . count ($rows) . "</total>n";

This worked, in that it caused jqGrid to start loading as needed, but the grid still stops at 400 rows, as shown above (402 above is a typo)!

But if this is correct, the documentation is wrong, and should really be fixed! ;)

09/03/2010
20:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

It is up to developer how to do this. It is not a bug and the code in documentation is the code used into the demo

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/03/2010
22:54
Avatar
rudiger
Member
Members
Forum Posts: 3
Member Since:
09/03/2010
sp_UserOfflineSmall Offline

Hi Tony,

Thanks for your replies.

Is it not a bug? I am getting the same problems. It is unclear where we should use

$s .= "<records>" . $count . "</records>";

$s .= "<total>" . $total_pages . "</total>";

or

$s .= "<records>" . $totalpages . "</records>n";

$s .= "<total>" . count ($rows) . "</total>n";

Can you post the PHP and grid for one of the working examples on the site that use True Scrolling?

10/03/2010
01:16
Avatar
monoclast
Cedar Park, TX, USA
Member
Members
Forum Posts: 12
Member Since:
08/02/2010
sp_UserOfflineSmall Offline

tony said:

Hello,

It is up to developer how to do this. It is not a bug and the code in documentation is the code used into the demo

Regards

Tony


Well, since we can't persuade you to help, I looked at the code again with a fresh mind today, and I figured it out on my own.  ðŸ™‚

The documentation says:

total: the total pages in the query

records: the total records from the query

But this is misleading and incorrect. What is should say is:

total: the total number of pages in the entire data set

records: the total number of records in the entire data set

The phrase "in the query" is very misleading, because with "True Scrolling", you actually query the database for only a small number of rows at a time! So of course the total of the query is not the entire data set.

Rudiger: If you use this corrected code (notice the records element value), it works correctly:

$s = "<?xml version='1.0' encoding='utf-8'?>\n";

$s .= "<rows>\n";

$s .= "   <page>" . $page . "</page>\n";

$s .= "   <total>" . $totalpages . "</total>\n";

$s .= "   <records>" . $totalrows . "</records>\n";

foreach ($rows as $row)

{

$s .= "   <row id="" . $row['id'] . "">\n";

$s .= "      <cell>" . $row['id'] . "</cell>\n";

$s .= "      <cell>" . $row['word'] . "</cell>\n";

$s .= "   </row>\n";

}

$s .= "</rows>\n";

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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