<?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: Sorting with Paging</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging</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/sorting-with-paging/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>pupian on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11183</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11183</guid>
        	        	<description><![CDATA[<p>yeah it stayed at the current page but the data.. but it sorts all the data not the data within the selected page. is there any way to sort the data in the selected page?</p>
</p>
<p>for instance i have an alphabet table:</p>
<p>im in page 2 and the data in the table are-</p>
<p>p</p>
<p>s</p>
<p>t</p>
<p>r</p>
<p>and i want to sort those data and it would be like:</p>
<p>p</p>
<p>r</p>
<p>s</p>
<p>t</p>
<p>not like:</p>
<p>a</p>
<p>b</p>
<p>c</p>
<p>d</p>
<p>or</p>
<p>w</p>
<p>x</p>
<p>y</p>
<p>z</p>
]]></description>
        	        	<pubDate>Wed, 28 Oct 2009 09:21:30 +0200</pubDate>
        </item>
        <item>
        	<title>josh on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11150</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11150</guid>
        	        	<description><![CDATA[<p>Perfect.&#160; Thank you.</p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 12:17:17 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11125</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11125</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The solution is a little bit tricky.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3382' value='Select Code' data-codeid='sfcode3382' /></p>
<div class='sfcode' id='sfcode3382'>
<p>onSortCol: function(index,iCol,sort){</p>
<p>var postpage = jQuery(&#8221;#list&#8221;).getGridParam(&#39;postData&#39;);</p>
<p>jQuery(&#8221;#list&#8221;).setGridParam({page:<strong>postpage.page</strong>});</p>
<p>}</p>
</div>
<p>Regards</p>
<p>Tony</p></p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 03:58:18 +0200</pubDate>
        </item>
        <item>
        	<title>josh on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11086</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11086</guid>
        	        	<description><![CDATA[<p>I suppose that I could keep track of the page number by creating a variable for currentPage and then doing something like:</p>
</p>
<p>onPaging: function() { currentPage = $(&#39;#list&#39;).getGridParam(&#39;page&#39;); },</p>
<p>onSortCol: function() { jQuery(&#39;#list&#39;).setGridParam({page:currentPage});</p>
</p>
<p>But is there a cleaner way??</p>
]]></description>
        	        	<pubDate>Mon, 26 Oct 2009 13:16:38 +0200</pubDate>
        </item>
        <item>
        	<title>josh on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11085</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11085</guid>
        	        	<description><![CDATA[<p>Right... I had tried that.&#160; See my last post:</p>
</p>
<p>"When I call $(&#39;#list&#39;).getGridParam(&#39;page&#39;) from within the onSortCol function, it returns &#8220;1&#8243; even if I&#39;m on page 5."</p>
</p>
<p>I tested this by simply placing an alert($(&#39;#list&#39;).getGridParam(&#39;page&#39;)) inside the onSortCol function.&#160; If I&#39;m on, for example, page 5 and click a column to change the sort, the alert box displays "1", instead of "5" like I would have thought.&#160; Any idea why or what I could try different?</p>
]]></description>
        	        	<pubDate>Mon, 26 Oct 2009 13:11:15 +0200</pubDate>
        </item>
        <item>
        	<title>Rumen[Trirand] on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11080</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11080</guid>
        	        	<description><![CDATA[<p>Yes, the page the grid is currently on is accessible in the property (option, in jQuery UI terms) "page". To access it, use something like that</p>
</p>
<p>var grid = $("#myGridID");</p>
<p>var page = grid.getGridParam(&#39;page&#39;)</p>
</p>
<p>then pass the page variable on with the sort events.</p>
]]></description>
        	        	<pubDate>Mon, 26 Oct 2009 11:11:22 +0200</pubDate>
        </item>
        <item>
        	<title>josh on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11078</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11078</guid>
        	        	<description><![CDATA[<p>OK - I can set the page within onSortCol and the list jumps to that page after sorting:</p>
<p>onSortCol: function(index,iCol,sort){jQuery("#list").setGridParam({page:3});</p>
</p>
<p>However, I obviously don&#39;t want to hard-code the page number... and instead it should be set depending on what page I&#39;m on when I click the column to sort by.&#160;&#160; How can I fetch the current page in order to set it in the setGridParam above?&#160; When I call $(&#39;#list&#39;).getGridParam(&#39;page&#39;) from within the onSortCol function, it returns "1" even if I&#39;m on page 5.</p>
]]></description>
        	        	<pubDate>Mon, 26 Oct 2009 10:36:55 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11040</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p11040</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Look at onSortCol event. It will do the job.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 23 Oct 2009 11:42:28 +0300</pubDate>
        </item>
        <item>
        	<title>josh on Sorting with Paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p10959</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorting-with-paging#p10959</guid>
        	        	<description><![CDATA[<p>With paging enabled, if I jump to page 3 and then change the sort order by clicking a column, the sorting changes and I am sent back to page 1.&#160; Is there a way to retain the page that I am on when the sort order changes?&#160; In other words, when I am on page 3 and I change the sort order, I&#39;d like to stay on page 3.</p>
<p>Thanks.</p>
]]></description>
        	        	<pubDate>Wed, 21 Oct 2009 13:32:26 +0300</pubDate>
        </item>
</channel>
</rss>