<?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: Cannot change page in 'onPaging' event</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event</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/cannot-change-page-in-onpaging-event/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Cannot change page in 'onPaging' event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2593</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2593</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Better</p>
<p><span class="sfcode">if (parseInt(requestedPage) &#62; parseInt(lastPage))</span></p>
<p>Regsrds</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 19 Oct 2008 07:45:40 +0300</pubDate>
        </item>
        <item>
        	<title>davidelewis on Cannot change page in 'onPaging' event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2577</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2577</guid>
        	        	<description><![CDATA[<p>The problem wasn&#39;t <strong>jqGrid </strong>or <strong>jQuery </strong>- it was a JavaScript problem ...</p>
<p>The line <span class="sfcode">if ((requestedPage &#62; lastPage) ...</span></p>
<p>Needs to be replaced with <span class="sfcode">if (eval(requestedPage) &#62; eval(lastPage)) ...</span></p>
<p>Thanks, again!</p>
]]></description>
        	        	<pubDate>Fri, 17 Oct 2008 13:05:57 +0300</pubDate>
        </item>
        <item>
        	<title>davidelewis on Cannot change page in 'onPaging' event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2576</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2576</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>Thanks for the suggestion ... unfortunately it doesn&#39;t work. Is there any chance that the onpaging event completes before the setGridParam() can update the page value (as this could explain what I am observing)?</p>
<p>Any other suggestions? Thanks!</p>
<p>~ David</p>
]]></description>
        	        	<pubDate>Fri, 17 Oct 2008 12:05:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cannot change page in 'onPaging' event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2569</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2569</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You do not need to call trigger("reloadGrid") as this is done immediatley</p>
<p>after the on pagging event. I think that to work this you should</p>
<p>replace the</p>
<p>$(&#8221;#grid&#8221;).setGridParam({page:lastPage}).trigger(&#8221;reloadGrid&#8221;);</p>
<p>with</p>
<p>$(&#8221;#grid&#8221;).setGridParam({page:lastPage});</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 17 Oct 2008 09:17:24 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cannot change page in 'onPaging' event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2568</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2568</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You do not need to call trigger("reloadGrid") as this is done immediatley</p>
<p>after the on pagging event. I think that to work this you should</p>
<p>replace the</p>
<p>$(&#8221;#grid&#8221;).setGridParam({page:lastPage}).trigger(&#8221;reloadGrid&#8221;);</p>
<p>with</p>
<p>$(&#8221;#grid&#8221;).setGridParam({page:lastPage});</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 17 Oct 2008 09:16:17 +0300</pubDate>
        </item>
        <item>
        	<title>davidelewis on Cannot change page in 'onPaging' event</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2558</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-change-page-in-onpaging-event#p2558</guid>
        	        	<description><![CDATA[<p>Using jqGrid 3.2, I&#39;m trying to ensure that the requested page is not greater than the last page available ... but although the alert boxes report the correct information, the page does not seem to be reset properly. Ideas? Is there any way to intecept the onPaging event and cancel it?</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3430' value='Select Code' data-codeid='sfcode3430' /></p>
<div class='sfcode' id='sfcode3430'>
<p>onPaging: function (pgButton) {<br />&#160; // if user has entered page number<br />&#160; if (pgButton == "user") {<br />&#160; &#160; // find out the requested and last page<br />&#160;&#160;&#160; var requestedPage = $("#grid").getGridParam("page");<br />&#160; &#160; var lastPage = $("#grid").getGridParam("lastpage");<br />&#160;&#160;&#160; alert("requestedPage: " + requestedPage + ", lastPage: " + lastPage);<br />&#160; &#160; // if the requested page is higher than the last page value <br />&#160;&#160;&#160; if (requestedPage &#62; lastPage) {<br />&#160;&#160;&#160;&#160;&#160; alert("Setting to " + lastPage);<br />&#160;&#160; &#160;&#160; // set the requested page to the last page value - then reload<br />&#160;&#160;&#160;&#160;&#160; $("#grid").setGridParam({page:lastPage}).trigger("reloadGrid");<br />&#160;&#160;&#160; }<br />&#160; }<br /> }</p>
</div>
]]></description>
        	        	<pubDate>Thu, 16 Oct 2008 19:37:30 +0300</pubDate>
        </item>
</channel>
</rss>