Forum


23:27

08/02/2010

Hello,
I previously asked about how to get true scrolling to work in this forum thread:
But now I see true scrolling still does not seem to work correctly!
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):
I would appreciate any help you might be able to offer, even just confirmation that this is a bug in jqGrid!
01:44

08/02/2010

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!
20:02

Moderators
30/10/2007

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.
22:54

09/03/2010

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?
01:16

08/02/2010

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";
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66