<?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: TreeGrid collapsing bug?</title>
	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug</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/treegrid-collapsing-bug/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>deva on TreeGrid collapsing bug?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21876</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21876</guid>
        	        	<description><![CDATA[<blockquote>
<p>deva said:</p>
<p>I have been trying to show the records in the treeview format using jqgrid. I have used the above as sample code and did exercises. Empty page is loading in the browser.&#160; Can any one give me proper sample code to view the records in the treeview format. Thanks in advance..</p>
</blockquote>
<hr />
<p>Kindly give me the way to do that. let say I am having root as&#160; [&#160; 0,&#160; 1,&#160; 4 ]<br />&#160;&#160;&#160;&#160; Child indexes are<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0=&#62;[&#160; 1,&#160; 4,&#160; 7,&#160; 8,&#160; 9 ]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1=&#62;[&#160; 2,&#160; 3 ]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4=&#62;[&#160; 5,&#160; 6 ]</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Child index records should come under the root records. like</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +-----1<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +--2<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +--3<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +---4<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +--5<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +--6<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +---7<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +---8<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; +---9</p>
</p>
<p>Thanks..</p></p>
]]></description>
        	        	<pubDate>Sat, 29 Jan 2011 11:36:37 +0200</pubDate>
        </item>
        <item>
        	<title>deva on TreeGrid collapsing bug?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21803</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21803</guid>
        	        	<description><![CDATA[<p>I have been trying to show the records in the treeview format using jqgrid. I have used the above as sample code and did exercises. Empty page is loading in the browser.&#160; Can any one give me proper sample code to view the records in the treeview format. Thanks in advance..</p>
]]></description>
        	        	<pubDate>Mon, 24 Jan 2011 11:32:46 +0200</pubDate>
        </item>
        <item>
        	<title>waiting on TreeGrid collapsing bug?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21393</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21393</guid>
        	        	<description><![CDATA[<p>yes, line381 , expandNode() use this methond, but collapseNode not in v3.82</p>
]]></description>
        	        	<pubDate>Thu, 23 Dec 2010 07:08:27 +0200</pubDate>
        </item>
        <item>
        	<title>dobuo on TreeGrid collapsing bug?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21390</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-collapsing-bug#p21390</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>The TreeGrid in jqGrid 3.8.2, treeReader.expanded_field does not work.</p>
<p>After collapsing field, expanding the field does not work. This case is caused by loading custom data (i.e. JSON-RPC response).</p>
<p>And I have modified and created patch.</p>
<p>I&#39;m a newbie for jQuery, if there is other avoidance, please advice me. ... using without expanded_field property is most simple way :).</p>
</p>
<p>Sample code is below.</p>
<p>&#160;&#160;&#160; $("#treegrid").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;url: &#39;media/rpc_treedata.txt&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#39;json&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;mtype: &#39;POST&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames: ["ID", "Description", "Total"],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colModel: [<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;id&#39;, index:&#39;id&#39;, width:1, hidden:true, key:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;desc&#39;, index:&#39;desc&#39;, hidden:false, sortable:true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;num&#39;, index:&#39;num&#39;, hidden:false, sortable:true}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;treeGridModel: &#39;adjacency&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;height: &#39;auto&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;width: &#39;500&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pager: "#ptreegrid",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;treeGrid: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ExpandColumn: &#39;desc&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ExpandColClick: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;caption: "Tree Grid Example",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;tree_root_level: 0,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jsonReader: {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;repeatitems: false,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;id: "id",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;root: function(obj) { return obj["result"]["records"]; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;page: function(obj) { return 1; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;total: function(obj) { return 1; },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;records: function(obj) { return obj["result"]["records"].length; }<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;treeReader: {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;level_field:&#160;&#160; &#160;&#160;&#160; &#160;"lv",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;parent_id_field:&#160;&#160; &#160;"pt",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;leaf_field:&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;"lf",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;expanded_field:&#160;&#160; &#160;&#160;&#160; &#160;"ex"<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160;&#160; });</p>
</p>
<p>Data,</p>
<p>{<br />&#160;&#160; &#160;"jsonrpc": "2.0",<br />&#160;&#160; &#160;"result": {<br />&#160;&#160; &#160;&#160;&#160; &#160;"records": [<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"id":101, "desc":"Super Item", "num":300, "lv":0, "pt":null, "lf":false, "ex":false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"id":102, "desc":"Item 1"&#160;&#160;&#160; , "num":100, "lv":1, "pt":101 , "lf":false, "ex":false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"id":103, "desc":"Sub Item 1", "num":50 , "lv":2, "pt":102 , "lf":true , "ex":true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"id":104, "desc":"Sub Item 2", "num":25 , "lv":2, "pt":102 , "lf":false, "ex":false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"id":105, "desc":"Sub-sub 1" , "num":25 , "lv":3, "pt":104 , "lf":false, "ex":false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"id":106, "desc":"Sub Item 3", "num":25 , "lv":2, "pt":102 , "lf":true , "ex":true}<br />&#160;&#160; &#160;&#160;&#160; &#160;]<br />&#160;&#160; &#160;}<br />}</p>
</p>
<p>This is caused by inappropriate attribute name of object. The fix patch is below.</p>
<p>--- grid.treegrid.js.orig&#160;&#160;&#160;&#160;&#160;&#160; 2010-12-23 09:10:43.000000000 +0900<br />+++ grid.treegrid.js&#160;&#160;&#160; 2010-12-23 09:11:22.000000000 +0900<br />@@ -412,8 +412,9 @@<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; collapseNode : function(rc) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return this.each(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(!this.grid &#124;&#124; !this.p.treeGrid) { return; }<br />-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(rc.expanded) {<br />-&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rc.expanded = false;<br />+&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var expanded = this.p.treeReader.expanded_field;<br />+&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(rc[expanded]) {<br />+&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rc[expanded] = false;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var id = $.jgrid.getAccessor(rc,this.p.localReader.id);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var rc1 = $("#"+id,this.grid.bDiv)[0];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("div.treeclick",rc1).removeClass(this.p.treeIcons.minus+" tree-minus").addClass(this.p.treeIcons.plus+" tree-plus");</p>
</p>
<p>Thanks.</p></p>
]]></description>
        	        	<pubDate>Thu, 23 Dec 2010 02:24:37 +0200</pubDate>
        </item>
</channel>
</rss>