<?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: I think it's a small bug for pager!</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/i-think-its-a-small-bug-for-pager</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/i-think-its-a-small-bug-for-pager/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on I think it's a small bug for pager!</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/i-think-its-a-small-bug-for-pager#p25861</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/i-think-its-a-small-bug-for-pager#p25861</guid>
        	        	<description><![CDATA[<p>You are right. The bug exist in <a href="https://github.com/tonytomov/jqGrid/blob/v4.3.1/js/grid.base.js#L1866-1867" target="_blank">the two lines</a> of code inside of <strong>$(&#39;.ui-pg-selbox&#39;,"#"+pgcnt).bind(&#39;change&#39;,function() {...}</strong>.:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8442' value='Select Code' data-codeid='sfcode8442' /></p>
<div class='sfcode' id='sfcode8442'>if(tp) { $(&#39;.ui-pg-selbox&#39;,ts.p.pager).val(this.value); }<br />else if(ts.p.toppager) { $(&#39;.ui-pg-selbox&#39;,ts.p.toppager).val(this.value); }&#160;</div>
<p>The problem is that the variable tp will be either "_t_list_toppager" or "_pager" (if the pager has id="pager"). So the <strong>if(tp)</strong> will <em>always work</em>. So we have two problem:</p>
<p>The first one if the number of rows are changed in the bottom pager and the additional top pager exist. In the face the else if part will not work and the top pager will have the old valus.</p>
<p>The second problem exist if only the top pager exist and no <strong>pager</strong> parameter is defined. In the case the <strong>ts.p.pager</strong> will be <strong>""</strong> and the existing code will change the number of rows in <em>all pager of all grids</em>. Which is also wrong.</p>
<p>As the fix I suggest to change the above two lines of the code to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3269' value='Select Code' data-codeid='sfcode3269' /></p>
<div class='sfcode' id='sfcode3269'>if(ts.p.pager) { $(&#39;.ui-pg-selbox&#39;,ts.p.pager).val(this.value); }<br />if(ts.p.toppager) { $(&#39;.ui-pg-selbox&#39;,ts.p.toppager).val(this.value); }&#160;</div>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Fri, 03 Feb 2012 12:51:38 +0200</pubDate>
        </item>
        <item>
        	<title>yangzy666 on I think it's a small bug for pager!</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/i-think-its-a-small-bug-for-pager#p25860</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/i-think-its-a-small-bug-for-pager#p25860</guid>
        	        	<description><![CDATA[<p>Hello everyone,</p>
<p>I found that when i show both toppager and bottompager,the rowNum in both of them is not consistent.</p>
<p>for example,when i change rowNum in toppager,the bottompager will follow it,conversely,it won&#39;t.</p>
]]></description>
        	        	<pubDate>Fri, 03 Feb 2012 08:54:27 +0200</pubDate>
        </item>
</channel>
</rss>