<?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: Load at Once Row Order problem</title>
	<link>http://www.trirand.com/blog/?page_id=393/treegrid/load-at-once-row-order-problem</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/treegrid/load-at-once-row-order-problem/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Akshitha on Load at Once Row Order problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/load-at-once-row-order-problem#p24837</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/load-at-once-row-order-problem#p24837</guid>
        	        	<description><![CDATA[<p>Hi,<br />&#160;&#160; &#160;Am using JQGrid 4.1.2 version. In this am facing some problem in tree grid while using Adjacency model (Load at once). Am loading the JSON data from server. Tree grid is getting formed according to the row order from JSON data. Say for ex., Am forming tree grid for Branch &#38; Department. In my query am not able to sort according to the parent child hierarchy. Because around 6 tables i need to join. But i can get the records with proper id, parent, level &#38; is_leaf properties. </p>
<p>&#160;&#160; &#160;What grid is doing means &#8211; just its creating the rows from JSON whatever order it is. So the tree format is not coming up properly. When i click the root node of any department its collapsing the correct child but all children are under different parent(according to my JSON order).</p>
<p>&#160;&#160; Below is the data which am getting as a json from my server.</p>
<p>&#160;&#160; &#160;id&#160;&#160;&#160;&#160; name&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; level&#160;&#160;&#160;&#160; parent&#160;&#160;&#160;&#160; is_leaf&#160;&#160;&#160;&#160; expanded&#160;&#160;&#160;&#160; loaded<br />&#160;&#160; &#160;&#8212;&#8211;&#160; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#160; &#8212;&#8212;&#8211;&#160; &#8212;&#8212;&#8212;&#160; &#8212;&#8212;&#8212;-&#160; &#8212;&#8212;&#8212;&#8211;&#160; &#8212;&#8212;- <br />&#160;&#160; &#160;B1&#160;&#160;&#160;&#160; Shanghai Pvt Ltd&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (null)&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D3&#160;&#160;&#160;&#160; Finance &#38; Account&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D4&#160;&#160;&#160;&#160; Production&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D5&#160;&#160;&#160;&#160; Support&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D6&#160;&#160;&#160;&#160; Operation&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D13&#160;&#160;&#160; Software&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true <br />&#160;&#160; &#160;D82&#160;&#160;&#160; BPO&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D76&#160;&#160;&#160; Sub D12&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D75&#160;&#160;&#160; Sub D11&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D78&#160;&#160;&#160; Sub D21&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D84&#160;&#160;&#160; Operation1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D6&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D83&#160;&#160;&#160; BPO1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D82&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D79&#160;&#160;&#160; Sub D211&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D78&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D87&#160;&#160;&#160; BPO11&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D83&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D80&#160;&#160;&#160; Sub D2111&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 5&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D79&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D1&#160;&#160;&#160;&#160; Admin&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D2&#160;&#160;&#160;&#160; Sales&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;B13&#160;&#160;&#160; Beijing Pvt Ltd&#160;&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (null)&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D86&#160;&#160;&#160; Test 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B13&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D134&#160;&#160; Test Root&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B13&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D91&#160;&#160;&#160; Test Level 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D85&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D93&#160;&#160;&#160; Test 2 Level 1&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D86&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D133&#160;&#160; Test Level 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 5&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D92&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D92&#160;&#160;&#160; Test Level 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D91&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D85&#160;&#160;&#160; Test&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B13&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;B14&#160;&#160;&#160; Branch Office 3&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (null)&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D132&#160;&#160; Software&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B14&#160;&#160;&#160;&#160;&#160;&#160;&#160; false&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D95&#160;&#160;&#160; Level 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D132&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D94&#160;&#160;&#160; Root&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; B14&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;D136&#160;&#160; Level 2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D132&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true<br />&#160;&#160; &#160;B15&#160;&#160;&#160; Branch Office 4&#160;&#160;&#160;&#160;&#160; 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (null)&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160; true&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; true</p>
<p>&#160;&#160; &#160;Inside jqgrid function i&#39;ve defined all these.. <br />&#160;&#160; &#160;&#160;&#160; &#160;treeGrid: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;treeGridModel:&#39;adjacency&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;ExpandColumn : &#39;deptName&#39;</p>
<p>&#160;&#160; &#160;anything am i missing/doing wrong or this is how tree grid works right now??</p>
]]></description>
        	        	<pubDate>Fri, 07 Oct 2011 16:01:33 +0300</pubDate>
        </item>
</channel>
</rss>