<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: How does true scrolling work?</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15568</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15568</guid>
        	        	<description><![CDATA[<p>Well, since we can&#39;t persuade you to help, I looked at the code again with a fresh mind today, and I figured it out on my own. &#160;🙂</p>
<p>The&#160;<a href="/jqgridwiki/doku.php?id=wiki:first_grid" target="_blank">documentation says</a>:</p>
<p style="padding-left: 30px;"><strong>total</strong>: the total pages in the query</p>
<p style="padding-left: 30px;"><strong>records</strong>: the total records from the query</p>
<p>But this is misleading and incorrect. What is&#160;<em>should</em>&#160;say is:</p>
<p style="padding-left: 30px;"><strong>total</strong>: the total number of pages&#160;<em>in the entire data set</em></p>
<p style="padding-left: 30px;"><strong>records</strong>: the total number of records&#160;<em>in the entire data set</em></p>
<p>The phrase "in the query" is very misleading, because with "True Scrolling", you actually query the database for only a&#160;<em>small number of rows at a time</em>! So of course the total of the query is not the entire data set.</p>
<p>Rudiger:&#160;If you use this corrected code (notice the&#160;<strong>records</strong>&#160;element value), it works correctly:</p>
<p><span style="color: #0000ff;">$s = "&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">$s .= "&#60;rows&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">$s .= " &#160; &#60;page&#62;" . $page . "&#60;/page&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">$s .= " &#160; &#60;total&#62;" . $totalpages . "&#60;/total&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><em><span style="color: #0000ff;">$s .= " &#160; &#60;records&#62;" .&#160;</span><strong><span style="color: #0000ff;">$totalrows</span></strong><span style="color: #0000ff;">&#160;. "&#60;/records&#62;\n";</span></em></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">foreach ($rows as $row)</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">{</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;">$s .= " &#160; &#60;row id="" . $row[&#39;id&#39;] . ""&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;">$s .= " &#160; &#160; &#160;&#60;cell&#62;" . $row[&#39;id&#39;] . "&#60;/cell&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;">$s .= " &#160; &#160; &#160;&#60;cell&#62;" . $row[&#39;word&#39;] . "&#60;/cell&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p style="padding-left: 30px;"><span style="color: #0000ff;">$s .= " &#160; &#60;/row&#62;\n";</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">}</span></p>
<p><span style="color: #0000ff;"> </span></p>
<p><span style="color: #0000ff;">$s .= "&#60;/rows&#62;\n";</span></p>
]]></description>
        	        	<pubDate>Wed, 10 Mar 2010 01:42:01 +0200</pubDate>
        </item>
        <item>
        	<title>rudiger on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15567</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15567</guid>
        	        	<description><![CDATA[<p>This looks like a bug.</p>
</p>
<p>The behavior for the examples is way different in IE8 (version 8.0.7600.16385) and in Firefox (version 3.6)...</p>
</p>
<p>IE8 won&#39;t display more than 50,000 (in the 500,000 row example).</p>
]]></description>
        	        	<pubDate>Wed, 10 Mar 2010 01:25:55 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15565</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15565</guid>
        	        	<description><![CDATA[<p>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.</p>
<p>Without being able to read the PHP we are left strictly guessing from seemingly incorrect documentation!</p>
]]></description>
        	        	<pubDate>Wed, 10 Mar 2010 01:02:39 +0200</pubDate>
        </item>
        <item>
        	<title>rudiger on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15560</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15560</guid>
        	        	<description><![CDATA[<blockquote>
<p>tony said:</p>
<p>Hello,</p>
<p>How many goldstars?<img class="spSmiley" style="margin:0" title="Wink" src="/blog/wp-content/forum-smileys/sf-wink.gif" alt="Wink" /></p>
<p>The error is in your php script just replace</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1430' value='Select Code' data-codeid='sfcode1430' /></p>
<div class='sfcode' id='sfcode1430'>
<p>$s .= &#34;&#60;rows&#62;n&#34;;<br />$s .= &#34;&#160;&#160; &#60;page&#62;&#34; . $page . &#34;&#60;/page&#62;n&#34;;<br />$s .= &#34;&#160;&#160; &#60;total&#62;&#34; . $totalpages . &#34;&#60;/total&#62;n&#34;;<br />$s .= &#34;&#160;&#160; &#60;records&#62;&#34; . count ($rows) . &#34;&#60;/records&#62;n&#34;;</p>
<p>with</p>
<p>$s .= &#34;&#60;rows&#62;n&#34;;<br />$s .= &#34;&#160;&#160; &#60;page&#62;&#34; . $page . &#34;&#60;/page&#62;n&#34;;<br />$s .= &#34;&#160;&#160; &#60;total&#62;&#34; . count ($rows) . &#34;&#60;/total&#62;n&#34;;<br />$s .= &#34;&#160;&#160; &#60;records&#62;&#34; .$totalpages&#160; . &#34;&#60;/records&#62;n&#34;;</p>
</div>
</blockquote>
<hr />
<p>I&#39;m having the same problem... I tried both XML and JSON responses, and the true scrolling does not work...</p>
</p>
<p>I tried this "fix", and although it scrolls, the bottom row of the grid becomes the totalPages (500,000), instead of the count (10,000,000)...</p>
</p>
<p>The examples on the site work with the original PHP? Please tell us the way the site examples are working?</p>
]]></description>
        	        	<pubDate>Tue, 09 Mar 2010 22:50:54 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15501</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15501</guid>
        	        	<description><![CDATA[<p>I find now that this is actually not working correctly at all! Apparently there is a bug in jqGrid!</p>
<p>Only the first 400 rows are loaded, and after that jqGrid just stops invoking the PHP file!</p>
<p>I have documented it here with a live example:</p>
<p>/blog/?page_id=393/help/true-scrolling-bug/</p>
<p>Any comments would be appreciated!</p>
]]></description>
        	        	<pubDate>Mon, 08 Mar 2010 21:40:37 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15016</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p15016</guid>
        	        	<description><![CDATA[<p>Ok thanks I&#39;ll debug it!</p>
]]></description>
        	        	<pubDate>Sat, 20 Feb 2010 17:10:08 +0200</pubDate>
        </item>
        <item>
        	<title>tony on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14981</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14981</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Look afgain in your php script, maybe you return only 100 from here</p>
<p>No limitations at all</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 20 Feb 2010 10:07:44 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14907</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14907</guid>
        	        	<description><![CDATA[<p>One last question:</p>
<p>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?</p>
]]></description>
        	        	<pubDate>Wed, 17 Feb 2010 19:31:24 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14904</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14904</guid>
        	        	<description><![CDATA[<p>Aha!!!! It works!!!!! Thank you so much for spotting that!</p>
<p>I have fixed my sloppy Javascript as well, thanks to you. &#160;: )</p>
<p><a href="http://jollyroger.kicks-ass.org/goldstar-1.jpg"><img src="http://jollyroger.kicks-ass.org/goldstar-1.jpg" width="100"  class="sfimageleft spUserImage" alt="gold star" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></p>
]]></description>
        	        	<pubDate>Wed, 17 Feb 2010 17:33:41 +0200</pubDate>
        </item>
        <item>
        	<title>tony on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14863</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14863</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>How many goldstars?<img class="spSmiley" style="margin:0" title="Wink" src="/blog/wp-content/forum-smileys/sf-wink.gif" alt="Wink" /></p>
<p>The error is in your php script just replace</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7806' value='Select Code' data-codeid='sfcode7806' /></p>
<div class='sfcode' id='sfcode7806'>
<p>$s .= "&#60;rows&#62;\n";<br />$s .= "&#160;&#160; &#60;page&#62;" . $page . "&#60;/page&#62;\n";<br />$s .= "&#160;&#160; &#60;total&#62;" . $totalpages . "&#60;/total&#62;\n";<br />$s .= "&#160;&#160; &#60;records&#62;" . count ($rows) . "&#60;/records&#62;\n";</p>
<p>with</p>
<p>$s .= "&#60;rows&#62;\n";<br />$s .= "&#160;&#160; &#60;page&#62;" . $page . "&#60;/page&#62;\n";<br />$s .= "&#160;&#160; &#60;total&#62;" . count ($rows) . "&#60;/total&#62;\n";<br />$s .= "&#160;&#160; &#60;records&#62;" .$totalpages&#160; . "&#60;/records&#62;\n";</p>
</p>
</div>
<p>By the way you have a error in th js</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160; colModel:<br />&#160;&#160; &#160;&#160;&#160; &#160;[ <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;id&#39;, index:&#39;id&#39;, width:50, key:true}, <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;word&#39;, index:&#39;word&#39;, width:300}, &#60;-------- This will not work in IE<br />&#160;&#160; &#160;&#160;&#160; &#160;],</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 17 Feb 2010 11:40:40 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14845</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14845</guid>
        	        	<description><![CDATA[<p>Wow... This forum <em>really</em> screws up pasted code!</p>
<p>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:</p>
<p><a href="http://jollyroger.kicks-ass.org/grid_test.zip" target="_blank"><strong>grid_test.zip</strong></a></p>
<p>The first person to tell me what is wrong with the code gets a gold star. &#160;🙂</p>
]]></description>
        	        	<pubDate>Tue, 16 Feb 2010 22:23:19 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14841</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14841</guid>
        	        	<description><![CDATA[<p>LOL... I truly wish I could "look deeper in the demo", but the demo isn&#39;t very deep to begin with! You don&#39;t allow us to view the PHP file in the demo. And again, the demo doesn&#39;t tell exactly which options are required to make it work. Obviously it&#39;s not as straight forward as you seem to indicate!&#160;</p>
<p>I just did a small test, and it&#39;s <em>still</em> not working. See if you can tell me why:</p>
<p>Here&#39;s my index.html:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit277' value='Select Code' data-codeid='sfcode277' /></p>
<div class='sfcode' id='sfcode277'>&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#038;gt" rel="nofollow" target="_blank"><a href="http://www.w3.org/TR/xhtml1/DT" rel="nofollow">http://www.w3.org/TR/xhtml1/DT</a>.....t;&#038;gt</a>;<br />&#60;html&#62;<br />&#60;head&#62;<br /><span style=&#34;white-space: pre;&#34;> </span>&#60;meta http-equiv=&#34;content-type&#34; content=&#34;text/html;charset=iso-8859-1&#34;&#62;<br /><span style=&#34;white-space: pre;&#34;> </span>&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; media=&#34;screen&#34; href=&#34;css/ui-smoothness/jquery-ui-1.7.2.custom.css&#34; /&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; media=&#34;screen&#34; href=&#34;css/ui.jqgrid.css&#34; /&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34; src=&#34;javascript/jquery-1.4.1.min.js&#34;&#62;&#60;/script&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34; src=&#34;javascript/jquery-ui-1.7.2.custom.min.js&#34;&#62;&#60;/script&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34; src=&#34;javascript/i18n/grid.locale-en.js&#34;&#62;&#60;/script&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34; src=&#34;javascript/jquery.jqGrid.min.js&#34;&#62;&#60;/script&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;script type=&#34;text/javascript&#34; language=&#34;javascript&#34; src=&#34;javascript/index.js&#34;&#62;&#60;/script&#62;&#160;&#60;/head&#62;&#160;&#60;body&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;table id=&#34;my_grid&#34;&#62;&#60;/table&#62;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#60;div id=&#34;my_grid_pager&#34;&#62;&#60;/div&#62;&#160;&#60;/body&#62;&#160;&#60;/html&#62;&#160;</div>
<p>&#160;Next, here&#39;s my index.js file:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7425' value='Select Code' data-codeid='sfcode7425' /></p>
<div class='sfcode' id='sfcode7425'>jQuery(document).ready(function()&#160;{&#160;<span style=&#34;white-space: pre;&#34;> </span>my_grid = jQuery(&#34;#my_grid&#34;).jqGrid({&#160;<span style=&#34;white-space: pre;&#34;> </span>url: &#39;php/get_grid_data.php&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>datatype: &#39;xml&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>mtype: &#39;POST&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>colNames: [&#39;ID&#39;, &#39;Word&#39;],&#160;<span style=&#34;white-space: pre;&#34;> </span>colModel:&#160;<span style=&#34;white-space: pre;&#34;> </span>[&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#160;			{name:&#39;id&#39;, index:&#39;id&#39;, width:50, key:true},&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>&#160;			{name:&#39;word&#39;, index:&#39;word&#39;, width:300},&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>],&#160;<span style=&#34;white-space: pre;&#34;> </span>scroll: 1,&#160;<span style=&#34;white-space: pre;&#34;> </span>pager: &#39;#my_grid_pager&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>gridview: true,&#160;<span style=&#34;white-space: pre;&#34;> </span>viewrecords: true,&#160;<span style=&#34;white-space: pre;&#34;> </span>rowNum: 100,&#160;<span style=&#34;white-space: pre;&#34;> </span>sortname: &#39;id&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>sortorder: &#39;asc&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>emptyrecords: &#39;Nothing to display&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>caption: &#39;My Grid&#39;,&#160;<span style=&#34;white-space: pre;&#34;> </span>});&#160;<span style=&#34;white-space: pre;&#34;> </span>jQuery(&#34;#my_grid&#34;).navGrid(&#39;#my_grid_pager&#39;,{edit:false, add:false, del:false, refresh:false});&#160;});&#160;</div>
<p>Here&#39;s my get_grid_data.php file:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4838' value='Select Code' data-codeid='sfcode4838' /></p>
<div class='sfcode' id='sfcode4838'>&#60;?php</p>
<p>// obtain passed-in parameters<br />$page = $_POST[&#39;page&#39;];&#160;$limit = $_POST[&#39;rows&#39;];$sortindex = $_POST[&#39;sidx&#39;];&#160;$sortorder = $_POST[&#39;sord&#39;];&#160;</p>
<p>if ($page == 0) $page = 1;<br />if ($limit == 0) $limit = 1;&#160;if ($sortindex == &#39;&#39;) $sortindex = &#39;date&#39;;&#160;if ($sortorder == &#39;&#39;) $sortorder = &#39;DESC&#39;;&#160;</p>
<p>$result = db_count_grid_rows ($totalrows);<br />&#160;<br />if ($totalrows &#62; 0)&#160;{&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>$totalpages = ceil ($totalrows / $limit);&#160;&#160;}&#160;&#160;else&#160;&#160;{&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>$totalpages = 0;&#160;&#160;}&#160;&#160;</p>
<p>if ($page &#62; $totalpages) $page = $totalpages;&#160;<br />$start = ($limit * $page) - $limit;&#160;<br />if ($start &#60; 0) $start = 0;&#160;<br />&#160;$result = db_get_grid_data ($sortindex, $sortorder, $start, $limit, $rows);&#160;</p>
<p>header (&#34;Last-Modified: &#34; . gmdate( &#34;D, d M Y H:i:s&#34; ) . &#34;GMT&#34; );&#160;&#160;header (&#34;Cache-Control: no-cache, must-revalidate&#34; );&#160;&#160;header (&#34;Pragma: no-cache&#34; );&#160;header (&#34;Content-type: text/xml&#34;);&#160;<br />$s = &#34;&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;\n&#34;;&#160;$s .= &#34;&#60;rows&#62;\n&#34;;&#160;$s .= &#34; &#160; &#60;page&#62;&#34; . $page . &#34;&#60;/page&#62;\n&#34;;&#160;$s .= &#34; &#160; &#60;total&#62;&#34; . $totalpages . &#34;&#60;/total&#62;\n&#34;;&#160;$s .= &#34; &#160; &#60;records&#62;&#34; . count ($rows) . &#34;&#60;/records&#62;\n&#34;;&#160;foreach ($rows as $row)&#160;{&#160;<span style=&#34;white-space: pre;&#34;> </span>$s .= &#34; &#160; &#60;row id=\&#34;&#34; . $row[&#39;id&#39;] . &#34;\&#34;&#62;\n&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>$s .= &#34; &#160; &#160; &#160;&#60;cell&#62;&#34; . $row[&#39;id&#39;] . &#34;&#60;/cell&#62;\n&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>$s .= &#34; &#160; &#160; &#160;&#60;cell&#62;&#34; . $row[&#39;word&#39;] . &#34;&#60;/cell&#62;\n&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>$s .= &#34; &#160; &#60;/row&#62;\n&#34;;&#160;}&#160;$s .= &#34;&#60;/rows&#62;\n&#34;;&#160;&#160;echo $s;&#160;&#160;<br />// ------------------------------------------------------------------------------------------------&#160;<br />function db_count_grid_rows (&#38;$count)&#160;&#160;{<br /><span style=&#34;white-space: pre;&#34;> </span>global $db_host;&#160;<span style=&#34;white-space: pre;&#34;> </span>global $db_user;&#160;<span style=&#34;white-space: pre;&#34;> </span>global $db_pass;&#160;<span style=&#34;white-space: pre;&#34;> </span>global $db_name;&#160;</p>
<p><span style=&#34;white-space: pre;&#34;> </span>$result = true; // default: no error&#160;&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>$db = mysql_connect ($db_host, $db_user, $db_pass);&#160;<span style=&#34;white-space: pre;&#34;> </span>if (!$db)&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$result = mysql_error ();&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>else<br /><span style=&#34;white-space: pre;&#34;> </span>{<br /><span style=&#34;white-space: pre;&#34;> </span>if (mysql_select_db ($db_name))&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$query = &#34;SELECT COUNT(*) AS count FROM my_table&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>$db_result = mysql_query ($query);&#160;<span style=&#34;white-space: pre;&#34;> </span>$row = mysql_fetch_array ($db_result);&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>$count = $row[&#39;count&#39;];&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>else<br /><span style=&#34;white-space: pre;&#34;> </span>{&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>$count = 0;&#160;<span style=&#34;white-space: pre;&#34;> </span>$err = mysql_error();&#160;<span style=&#34;white-space: pre;&#34;> </span>$result = &#34;mysql_select_db ($db_name) failed: $err&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>mysql_close ($db);&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>return $result;&#160;}&#160;&#160;<br />function db_get_grid_data ($sortindex, $sortorder, $start, $numrows, &#38;$rows)&#160;&#160;{<br /><span style=&#34;white-space: pre;&#34;> </span>global $db_host;&#160;<span style=&#34;white-space: pre;&#34;> </span>global $db_user;&#160;<span style=&#34;white-space: pre;&#34;> </span>global $db_pass;&#160;<span style=&#34;white-space: pre;&#34;> </span>global $db_name;&#160;&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>$result = true; // default: rows found&#160;&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>$db = mysql_connect ($db_host, $db_user, $db_pass);&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>if (!$db)&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$result = mysql_error ($db);&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>}<br /><span style=&#34;white-space: pre;&#34;> </span>else<br /><span style=&#34;white-space: pre;&#34;> </span>{<br /><span style=&#34;white-space: pre;&#34;> </span>if (mysql_select_db ($db_name, $db))&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>{<br /><span style=&#34;white-space: pre;&#34;> </span>$sortindex = mysql_real_escape_string ($sortindex);&#160;<span style=&#34;white-space: pre;&#34;> </span>$sortorder = mysql_real_escape_string ($sortorder);&#160;<span style=&#34;white-space: pre;&#34;> </span>$start = mysql_real_escape_string ($start);&#160;<span style=&#34;white-space: pre;&#34;> </span>$numrows = mysql_real_escape_string ($numrows);&#160;<br /><span style=&#34;white-space: pre;&#34;> </span>$query = &#34;SELECT * FROM my_table ORDER BY $sortindex $sortorder LIMIT $start , $numrows&#34;;&#160;</p>
<p><span style=&#34;white-space: pre;&#34;> </span>$db_result = mysql_query ($query, $db);&#160;<span style=&#34;white-space: pre;&#34;> </span>if ($db_result !== false)&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$num = mysql_num_rows ($db_result);&#160;<span style=&#34;white-space: pre;&#34;> </span>if ($num !== false)&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>while ($row = mysql_fetch_array ($db_result))&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$rows[] = $row;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>else&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$err = mysql_error();&#160;<span style=&#34;white-space: pre;&#34;> </span>if ($err != &#34;&#34;)&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>$result = &#34;$err (QUERY = $query)&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>else&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$err = mysql_error ($db);&#160;<span style=&#34;white-space: pre;&#34;> </span>$result = &#34;mysql_query ($query) failed: $err&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>else&#160;<span style=&#34;white-space: pre;&#34;> </span>{&#160;<span style=&#34;white-space: pre;&#34;> </span>$err = mysql_error();&#160;<span style=&#34;white-space: pre;&#34;> </span>$result = &#34;mysql_select_db ($db_name) failed: $err&#34;;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>mysql_close ($db);&#160;&#160;<span style=&#34;white-space: pre;&#34;> </span>}&#160;<span style=&#34;white-space: pre;&#34;> </span>return $result;&#160;}&#160;?&#62;</p>
</div>
<p>When I load the HTML page, the PHP file gets called just <strong>once</strong>, to load 100 rows starting at row 1. It never gets called again.</p>
<p>So what&#39;s wrong or missing here?</p>
]]></description>
        	        	<pubDate>Tue, 16 Feb 2010 21:49:36 +0200</pubDate>
        </item>
        <item>
        	<title>tony on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14683</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14683</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This is right. There should be no change in the server response. Everthing is done client side, the same way as you prepare the paging mechanizm.</p>
<p>Also it seems that your sever response is not correct. There is not somthing special. Just look deeper in the demo.</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 10 Feb 2010 14:55:30 +0200</pubDate>
        </item>
        <item>
        	<title>monoclast on How does true scrolling work?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14641</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-does-true-scrolling-work#p14641</guid>
        	        	<description><![CDATA[<p>The demonstration page for <strong>New in Version 3.6 &#62; True Scrolling Rows</strong>&#160;doesn&#39;t show the bigset.php&#160;PHP file, and doesn&#39;t indicate which jqGrid options are key to getting real-time scrolling to work correctly.</p>
<p>Also, when I look at the&#160;<a href="/jqgridwiki/doku.php?id=wiki:options&#38;s[]=scroll" target="_blank">documentation for scrolling options</a>, it isn&#39;t clear what is required, which is frustrating, to say the least.</p>
<p>I&#39;ve added the <strong>scroll:1</strong> option to my grid, but apparently that&#39;s not enough. I don&#39;t see any difference in the parameters jqGrid is passing to my grid <strong>url:</strong> option PHP script. So obviously I am missing something crucial.</p>
<p>Can someone please list exactly what is required here, and/or update the demo page, and/or update the documentation to show clearly what is required to get real-time "true scrolling" working?</p>
]]></description>
        	        	<pubDate>Mon, 08 Feb 2010 22:28:29 +0200</pubDate>
        </item>
</channel>
</rss>