<?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: How to trigger initial client side sorting</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-trigger-initial-client-side-sorting</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/how-to-trigger-initial-client-side-sorting/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Arvind Yadav on How to trigger initial client side sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-trigger-initial-client-side-sorting#p26677</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-trigger-initial-client-side-sorting#p26677</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>Define the sortname,sortorder i.e. the column on which you want the default sorting. Then,</p>
<p>Change the datatype of the grid to local on the loadcomplete event of the jqgrid.</p>
</p>
<p>2nd option:</p>
<p>1. Fire a ajax call and get the data into a javascript array.</p>
<p>2. Define the jqgrid with datatype local and give the array constructed in step 1 as input to the grid.</p>
<p>3. Define the default sorting column and order</p>
</p>
<p>Thanks,</p>
]]></description>
        	        	<pubDate>Fri, 25 May 2012 22:13:32 +0300</pubDate>
        </item>
        <item>
        	<title>twilson7755 on How to trigger initial client side sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-trigger-initial-client-side-sorting#p26586</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-trigger-initial-client-side-sorting#p26586</guid>
        	        	<description><![CDATA[<p>I have a grid where the data is loaded once from a server (datatype: json, loadonce: true) and I am able to successfully display the data in the grid and click on the various column headings to trigger sorting. &#160;My problem is that the initial data that is returned from the server is NOT sorted and I would like the grid to perform the initial sorting on the client side without having to click a column heading.</p>
<p>I tried adding the following code to the loadComplete event but it had no effect:</p>
<p>loadComplete: function () {</p>
<p>&#160; &#160;$("#list").jqGrid(&#39;setGridParam&#39;, { sortname: &#39;Name&#39;, sortorder: &#39;asc&#39; });</p>
<p>&#160; &#160;$("#list").trigger("reloadGrid");</p>
<p>},</p>
<p>where &#39;Name&#39; is the colName that I would like the initial sorting performed on. &#160;Any ideas would be greatly appreciated.</p>
<p>Thanks,</p>
<p>Terry</p>
]]></description>
        	        	<pubDate>Sun, 13 May 2012 01:50:52 +0300</pubDate>
        </item>
</channel>
</rss>