<?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: Grid sorting when changing to Local</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grid-sorting-when-changing-to-local</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/grid-sorting-when-changing-to-local/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>hunkybill on Grid sorting when changing to Local</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-sorting-when-changing-to-local#p26089</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-sorting-when-changing-to-local#p26089</guid>
        	        	<description><![CDATA[<p>Solved.. ignore posting... just had to add a sorttype attribute.. duh...</p>
</p>
<p>Hi,</p>
<p>I have a grid that sorts perfect with the grid set to JSON mode. Thing is, the server calls an external API to populate the grid, so I only want to hit that external API once, and then let the client-side take over. So I used the simple grid setting <strong>loadonce: true</strong>, and then I tried the column sorting. It was all borked.&#160;</p>
<p>A quick inspection showed that on initial load, the data structure for each row is {cell:[] and id: foo} but once the loadonce setting kicked in, any attempts to sort the columns revealed each row reporting a completely different structure&#8230; eg)&#160;</p>
<ol class="properties properties-tree monospace">
<li>_id_:&#160;"39604792_162&#8243;</li>
<li>current:&#160;439</li>
<li>handle:&#160;"&#60;a href="https://dizzbuzz.com"&#62;Fizzbuzz&#60;/a&#62;"</li>
<li>id:&#160;162</li>
<li>minimum:&#160;80</li>
<li>price:&#160;"7.99&#8243;</li>
<li>sku:&#160;"FizzBuzz"</li>
</ol>
<p>where id has morphed to _id_ and the cell array contents were flattened out to straight up attributes&#8230; so now, all the sorting is pooched&#8230; none of the columns sort properly..&#160;</p>
<p>What&#39;s the secret sauce to flipping from a one time server load, to client-side sorting with this Grid&#8230; seems like I am encountering something rather odd here&#8230;&#160;</p>
<p>Any tips most appreciated&#8230;&#160;</p>
]]></description>
        	        	<pubDate>Wed, 07 Mar 2012 21:29:00 +0200</pubDate>
        </item>
</channel>
</rss>