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.
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.
As I stated in my initial post, it sure would be nice if you would actually allow people to read the PHP you are using on your demo page.
Without being able to read the PHP we are left strictly guessing from seemingly incorrect documentation!
I find now that this is actually not working correctly at all! Apparently there is a bug in jqGrid!
Only the first 400 rows are loaded, and after that jqGrid just stops invoking the PHP file!
I have documented it here with a live example:
/blog/?page_id=393/help/true-scrolling-bug/
Any comments would be appreciated!
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 .= “” . $count . “”;
$s .= “” . $total_pages . “”;
But in this forum post, I was instructed to swap these values like so:
$s .= “” . $totalpages . “n”;
$s .= “” . count ($rows) . “n”;
This worked, in that it caused jqGrid to start loading as needed, but the grid still stops at 400
Ok thanks I'll debug it!
One last question:
If I change the index.js rowNum: argument to 1000, the grid only loads the first 1000 rows. Is there something else I need to change to make it support loading 1000 rows at a time, or is it limited to auto-loading only 100?
Aha!!!! It works!!!!! Thank you so much for spotting that!
I have fixed my sloppy Javascript as well, thanks to you.
Wow… This forum really screws up pasted code!
So if you want to see the actual code, here is an archive of it – I included a mySQL dump of the actual database being queried as well:
The first person to tell me what is wrong with the code gets a gold star.
LOL… I truly wish I could “look deeper in the demo”, but the demo isn't very deep to begin with! You don't allow us to view the PHP file in the demo. And again, the demo doesn't tell exactly which options are required to make it work. Obviously it's not as straight forward as you seem to indicate!
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top