<?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: Loading last page calls the server multiple times</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times</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/loading-last-page-calls-the-server-multiple-times/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jrewing on Loading last page calls the server multiple times</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29784</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29784</guid>
        	        	<description><![CDATA[<p>.ui-jqgrid tr.jqgrow {<br />&#160;&#160;&#160; outline-style: none;<br />&#160;&#160;&#160; height: 27px;<br />&#160;&#160;&#160; vertical-align:middle !important;<br />}</p>
</p>
<p>Works for me !</p>
</p>
<p>When i used formatter with images i must set an height.</p>
</p>
<p>Maybe this helps when somebody have same problems 😉</p></p>
]]></description>
        	        	<pubDate>Sat, 02 Nov 2013 12:56:47 +0200</pubDate>
        </item>
        <item>
        	<title>jrewing on Loading last page calls the server multiple times</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29782</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29782</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>i have a similar problem. I&#39;m using 4.4.1 because i can&#39;t update JQuery 🙁</p>
</p>
<p>The last Ajax Request is called twice.When i scroll up and down many request are fired.</p>
</p>
<p>But only in Firefox 24 and higher - in Chrome all worked fine.</p>
</p>
<p>Scroll, 1</p>
<p>Rownum = 100</p>
</p>
<p>When you want i can gave you an demo url.</p>
</p>
<p>Best regards</p>
<p>Tom</p></p>
]]></description>
        	        	<pubDate>Sat, 02 Nov 2013 05:05:59 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Loading last page calls the server multiple times</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29614</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29614</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>The very simple test is just to add this line before the if and see the result.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1738' value='Select Code' data-codeid='sfcode1738' /></p>
<div class='sfcode' id='sfcode1738'>
<p>page = parseInt(page,10);</p>
<p>if (p.lastpage &#38;&#38; (page &#62; p.lastpage &#124;&#124; p.lastpage===1 &#124;&#124; (page === p.page &#38;&#38; page===p.lastpage)) ) {</p>
<p>&#160;&#160;&#160; return;</p>
<p>}</p>
</p>
</div>
<p>Please let me know if this work too for you (I suppose &#8211; it will not).</p>
</p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Sun, 06 Oct 2013 11:24:33 +0300</pubDate>
        </item>
        <item>
        	<title>cmeldrum on Loading last page calls the server multiple times</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29603</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29603</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>I appreciate your quick response.</p>
</p>
<p>We&#39;re actually going to table virtual scrolling right now and go back to pagination.</p>
</p>
<p>Thanks.</p>
</p>
<p>Chris</p>
]]></description>
        	        	<pubDate>Thu, 03 Oct 2013 23:02:14 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Loading last page calls the server multiple times</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29596</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29596</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>First of all thanks for the investigation.</p>
<p>I&#39;m not sure that this is true:</p>
<blockquote>
<p>page comes in as a string, while p.page and p.lastpage are numbers, so the triple equals in that last</p>
</blockquote>
<p>If you look into the code some lines above you will notice that the page when set is always integer.</p>
<p>It can be possible that some other components are not set correct.</p>
<p>It is very difficult to fix bugs when scroll is set to 1, since every case is uniquie at the client - CCS styles, grid configuratiin, server data and etc.</p>
</p>
<p>Can you please provide me a link to the problem using the jqGrid source and not min file?</p>
</p>
<p>Thank you very much</p>
</p>
<p>Kind Regards</p>
</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 03 Oct 2013 16:03:44 +0300</pubDate>
        </item>
        <item>
        	<title>cmeldrum on Loading last page calls the server multiple times</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29593</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loading-last-page-calls-the-server-multiple-times#p29593</guid>
        	        	<description><![CDATA[<p>jqgrid version 4.5.2</p>
</p>
<p>I implemented virtual scrolling on a search page (see code below).</p>
</p>
<p>Search results returned 64 results. When I scoll to the bottom, I first see "View 1 of 64&#8243;. If I scroll up a little and then back to the bottom again, the text changes to "View -3 of 64&#8243; and I see duplicate rows added to the table. If I do this a second time, the text changes to "View -7 of 64&#8243; and additional duplicate rows get added. Subsequent scrolls to the bottom have no further effect.</p>
</p>
<p>After a lot of digging, I found what I think was the issue. On line 968 of jquery.jqGrid.src.js</p>
</p>
<p>if (p.lastpage &#38;&#38; (page &#62; p.lastpage &#124;&#124; p.lastpage===1 &#124;&#124; (page === p.page &#38;&#38; page===p.lastpage)) ) {</p>
<p>&#160;&#160;&#160; return;</p>
<p>}</p>
</p>
<p>page comes in as a string, while p.page and p.lastpage are numbers, so the triple equals in that last part of the if statement always returns false, allowing execution to continue to where the populate function gets called again (twice). It&#39;s not until page exceeds the value of p.lastpage that subsequent calls to populate are prevented.</p>
</p>
<p>If I change the "===" to "==" the scrolling begins to work as I expect.</p>
</p>
<p>Can we get a fix that either sets the type of page to "number" to match the type of p.page and p.lastpage ("number"), or, alternatively, change the "===" to "=="? Or if there&#39;s some jqGrid option I can set to get the behavior I&#39;m expecting, please advise.</p>
</p>
<p>jqGrid code:</p>
</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; $(&#39;#someTable&#39;).jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;url: &#39;some.json&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#39;json&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;height: &#39;440px&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;shrinkToFit: false,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;headertitles:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;width: gridWidth,&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#160;&#160; &#160;&#39;Col 1&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#39;Col 2&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;...<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colModel:[&#160;&#160; &#160;{name:&#39;foo&#39;,index:&#39;foo&#39;, width:170, sortable:false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;bar&#39;, width:70, hidden:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;...<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowNum:20,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;scroll:1,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; loadonce:false,&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;mtype: "GET",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;viewsortcols: [true,&#39;vertical&#39;,true],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;sortorder: &#39;desc&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#someTablePager&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});</p></p>
]]></description>
        	        	<pubDate>Wed, 02 Oct 2013 20:13:38 +0300</pubDate>
        </item>
</channel>
</rss>