<?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: Scrolling and Pagination For Last Page</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page</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/bugs/scrolling-and-pagination-for-last-page/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Scrolling and Pagination For Last Page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p14977</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p14977</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I need to test this.</p>
<p>Thanks.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 20 Feb 2010 09:53:50 +0200</pubDate>
        </item>
        <item>
        	<title>eugenC76 on Scrolling and Pagination For Last Page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p14929</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p14929</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I had the same problem. I think solution is pretty simple, if I change:</p>
<p><span style="color: #339966;">Ln279: //page = parseInt((tbot + scrollTop) / div) + 1; // Original code</span></p>
<p><span style="color: #000000;">to</span></p>
<p><span style="color: #ff6600;">Ln279: page = parseInt((tbot + scrollTop + div - 1) / div) + 1; //changed code</span></p>
<p><span style="color: #000000;">in grid.base.js, everything works fine.</span></p>
<p>Also I found a problem: when grid uses <span style="color: #339966;">&#39;altrows:true</span>&#39; scrolling doesn&#39;t work. I did a workaround by adding</p>
<p><span style="color: #ff6600;">scrollTop -= (rows.outerHeight() - rows.innerHeight()) * rn;</span></p>
<p>after ln271.&#160;</p>
</p>
<p>Best Regards,</p>
<p>Eugeniu</p>
]]></description>
        	        	<pubDate>Thu, 18 Feb 2010 12:10:49 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Scrolling and Pagination For Last Page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p13826</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p13826</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thank you very much for the investigation.</p>
<p>Currently I can not confirm that this is a bug. I will check with your settings and let you known.</p>
<p>Thanks again</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 13 Jan 2010 16:52:38 +0200</pubDate>
        </item>
        <item>
        	<title>Molotov on Scrolling and Pagination For Last Page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p13769</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/scrolling-and-pagination-for-last-page#p13769</guid>
        	        	<description><![CDATA[<p>Hello, I&#39;ve been working with jqGrid 3.6.2 for a couple of days and noticed that I was not getting the pagination I expected. Here is my options object:</p>
<p>var options = {</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;jsonReader : {&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; root: "items",&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; page: "page", &#160; &#160; &#160; &#160;// pager</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; total: "total", &#160; &#160; &#160;// pager</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; records: "numRows", &#160;// pager</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; repeatitems: false,&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; cell: "items",&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; id: "inv_num",</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; userdata: "PHPSESSID"</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;},</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;prmNames: {</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;page:&#39;page&#39;,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;rows:&#39;count&#39;,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;sort:&#39;sort&#39;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;},</p>
<p><span style="white-space:pre"> </span>[...postData and colModel here...]</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;mtype: &#39;GET&#39;,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;colNames:[&#39;Inv #&#39;],</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;datatype:"json",</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;height: &#39;200&#39;,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;autowidth: true,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;shrinkToFit: true,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;scroll: true,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;sortname:&#39;inv_num&#39;,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;sortorder:"desc",</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;loadui: &#39;block&#39;,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;altRows: true,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;page: 1,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;scrollrows: true,</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;url:&#39;file.php&#39;</p>
<p><span style="white-space:pre"> </span>};</p>
<p>Notice that my &#39;page&#39; option is set to 1. I realize that this is the default. I noticed that on a data set that had 45 records, displaying 20 records would mean 3 pages (1-20, 21-40, 41-45). I noticed that when scrolling down, I could get page 1 and I could get page 2, but I could not get page 3. I thought perhaps this was due to my pagination calculation, so I changed &#39;page&#39; to zero hoping it would fix the issue, but instead I observed getting page 0, then page 2, I was never able to get page 1.</p>
<p>I went back to page = 1 and &#160;manually increased my response to say that the total pages was 3+1. From there I was able to get page 1, 2 and 3.&#160;</p>
<p>I looked around in grid.base.js and found where it was (I think) calculating whether or not to grab another page. I found this condition on line 273 of that file:</p>
</p>
<p>(ttop &#60;= 0 &#38;&#38; tbot &#60; dh &#38;&#38;&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(p.lastpage==null&#124;&#124;parseInt((tbot + scrollTop + div - 1) / div) &#60; p.lastpage))</p>
</p>
<p>If I changed the operator to: &#39;&#60;= p.lastpage&#39;, I was able to get all of my pages leaving page = 1.</p>
</p>
<p>Can anyone confirm that this is an error, or am I doing something incorrectly? The only way I could further test was to verify that in fact the request for the last page was never actually being sent out. Making this change also fixed a spacing issue at the bottom of my grid (I presume to be height related?).</p>
]]></description>
        	        	<pubDate>Mon, 11 Jan 2010 09:51:57 +0200</pubDate>
        </item>
</channel>
</rss>