<?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: setGridParam 'page' in loadComplete</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete</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/help/setgridparam-page-in-loadcomplete/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>HoSpiTaL_gHoSt on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11705</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11705</guid>
        	        	<description><![CDATA[<p>Ah yes, I managed to solve it on server side. I should have thought of this myself.</p>
<p>But it&#39;s strange, I thought jqgrid solved this problem by itself, because when you do regular paging and you go from a lower pagesize to a higher pagesize (for example, change pagesize 10 to 30), then jqgrid does solve it by itself: if the current page is greater than the pagesize, the current page gets edited.</p>
<p>Anyway, thanks a lot for your help Tony!</p>
]]></description>
        	        	<pubDate>Tue, 10 Nov 2009 03:03:09 +0200</pubDate>
        </item>
        <item>
        	<title>tony on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11667</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11667</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I think that the problem is in the response from the server. Could you please check this. Every element is recalculated&#160; when new request is done.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 09 Nov 2009 10:27:22 +0200</pubDate>
        </item>
        <item>
        	<title>HoSpiTaL_gHoSt on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11634</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11634</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>Here is my code that gets executed when the button is clicked:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4596' value='Select Code' data-codeid='sfcode4596' /></p>
<div class='sfcode' id='sfcode4596'>$(&#39;#grid&#39;).setGridParam({url:&#39;<a href="http://localhost:8888/xxx/abc?active=true&#038;#39" rel="nofollow" target="_blank"><a href="http://localhost:8888/xxx/abc" rel="nofollow">http://localhost:8888/xxx/abc</a>?.....e&#038;#39</a>;});<br />$(&#39;#grid&#39;).trigger("reloadGrid");</div>
</p>
<p>This way I filter the grid on the &#39;active&#39; records.</p></p>
]]></description>
        	        	<pubDate>Mon, 09 Nov 2009 01:35:48 +0200</pubDate>
        </item>
        <item>
        	<title>tony on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11601</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11601</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could you please post the code when you click the button to change the url</p>
<p>Thanks</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 06 Nov 2009 10:26:59 +0200</pubDate>
        </item>
        <item>
        	<title>HoSpiTaL_gHoSt on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11541</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p11541</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I noticed that this bug still happens when you dynamically change the url of the jqgrid.</p>
<p>EDIT: I use jqgrid 3.5.3</p>
<p>I have a button below my jqgrid, which changes the url of the grid to only show a part of the data. So, when you&#39;re on page 29/29, and you click the button, you end up on page 29/22, which should be 22/22.</p>
<p>I tried to fix this problem by using the code I posted as a start of this topic, but it doesn&#39;t work.</p>
]]></description>
        	        	<pubDate>Thu, 05 Nov 2009 09:11:25 +0200</pubDate>
        </item>
        <item>
        	<title>HoSpiTaL_gHoSt on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p10441</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p10441</guid>
        	        	<description><![CDATA[<p>Thank you for the quick reply!</p>
</p>
<p>I would download the latest version, but I can only use version 3.5.2 because I use a new web application framework which comes packaged with jqgrid 3.5.2. So normally I&#39;d have to wait until the framework uses another version of jqgrid, but I think that could take a while. I suppose there is no other "quick fix" I could use until the framework is updated?</p>
]]></description>
        	        	<pubDate>Tue, 06 Oct 2009 06:03:19 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p10439</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p10439</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The problem is fixed. Please download the latest version from GitHub.</p>
<p>Regardas</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 06 Oct 2009 05:59:18 +0300</pubDate>
        </item>
        <item>
        	<title>HoSpiTaL_gHoSt on setGridParam 'page' in loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p10437</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setgridparam-page-in-loadcomplete#p10437</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I recently updated from jqgrid 3.4 to 3.5.2, and now the code I put in the loadComplete doesn&#39;t seem to work anymore. The code is the following:</p>
</p>
<p>loadComplete : function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var pageSize = $(&#39;#grid&#39;).getGridParam("rowNum");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var totalRecords = $(&#39;#grid&#39;).getGridParam(&#39;records&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var totalPages = Math.ceil(totalRecords/pageSize);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var currentPage = $(&#39;#grid&#39;).getGridParam(&#39;page&#39;);<br />&#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; if(currentPage&#62; totalPages &#38;amp;&#38;amp; totalPages!=0){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $(&#39;#grid&#39;).setGridParam({page:totalPages}).trigger(&#39;reloadGrid&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; <br />}</p>
</p>
<p>I wrote this function as a fix for the following problem: say your pageSize is set to 10, and you&#39;ve got 27 pages with each 10 records. When you navigate to the last page, that is 27/27 and then change the pageSize to, let&#39;s say 30, you end up with 9 pages, but the current page is still 27/9, which is not correct. The loadComplete method stated above fixed this problem in 3.4, but it doesn&#39;t work in 3.5.2, it just doesn&#39;t reload my grid to the right page! Does anybody have an idea why?</p>
</p>
<p>Thanks in advance!</p>
]]></description>
        	        	<pubDate>Tue, 06 Oct 2009 05:56:15 +0300</pubDate>
        </item>
</channel>
</rss>