<?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: addChildNode do not count on expanded parameter of the pow</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow</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/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>rumax on addChildNode do not count on expanded parameter of the pow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27612</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27612</guid>
        	        	<description><![CDATA[<p>Thanks!</p>
]]></description>
        	        	<pubDate>Tue, 23 Oct 2012 12:22:33 +0300</pubDate>
        </item>
        <item>
        	<title>tony on addChildNode do not count on expanded parameter of the pow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27610</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27610</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Thanks. Just fixed the problem. It is in <a href="https://github.com/tonytomov/jqGrid/commit/ca304f1e4a06cb248ea8f25d67a7603f40f02413" target="_blank">GitHub</a>.</p>
<p>The fix is little bit diffrent.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 23 Oct 2012 11:42:18 +0300</pubDate>
        </item>
        <item>
        	<title>rumax on addChildNode do not count on expanded parameter of the pow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27595</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27595</guid>
        	        	<description><![CDATA[<p><strong><span style="text-decoration: underline;">The data I try to add:</span></strong></p>
<p style="padding-left: 30px;">var mydataSrc = [{id:"1", name:"Cash",        num:"100", level:"0", parent:"",  isLeaf:false, expanded:false, loaded:true },&#160;{id:"2", name:"Cash 1",      num:"1",   level:"1", parent:"1", isLeaf:false, expanded:false, loaded:true },{id:"3", name:"Sub Cash 1",num:"1",   level:"2", parent:"2", isLeaf:true,  expanded:false, loaded:true },{id:"4", name:"Cash 2",      num:"2",   level:"1",parent:"1", isLeaf:true,  expanded:false, loaded:true },{id:"5", name:"Bank\&#39;s",     num:"200", level:"0", parent:"",isLeaf:false, expanded:false, loaded:true },{id:"6", name:"Bank 1",      num:"1",   level:"1", parent:"5", isLeaf:true,expanded:false, loaded:true },{id:"7", name:"Bank 2",      num:"2",   level:"1", parent:"5", isLeaf:true,  expanded:false,loaded:true },{id:"8", name:"Fixed asset", num:"300", level:"0", parent:"",  isLeaf:true,  expanded:false,loaded:true }];</p>
<p><strong><span style="text-decoration: underline;">grid:</span></strong></p>
<p>var grid = $(&#39;&#60;table/&#62;&#39;).appendTo(&#39;body&#39;);&#160; &#160; grid.jqGrid({&#160; &#160; &#160; &#160; treedatatype: "local",&#160; &#160; &#160; &#160; datatype: "local",&#160; &#160; &#160; &#160; datastr: [],&#160; &#160; &#160; &#160; colNames:["Id","Account","Acc Num"],&#160; &#160; &#160; &#160; colModel:[&#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;id&#39;, index:&#39;id&#39;, width:1, hidden:true, key:true},&#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;name&#39;, index:&#39;name&#39;, width:180},&#160; &#160; &#160; &#160; &#160; &#160; {name:&#39;num&#39;, index:&#39;acc_num&#39;, width:80, align:"center"}&#160; &#160; &#160; &#160; ],&#160; &#160; &#160; &#160; height: &#39;auto&#39;,&#160; &#160; &#160; &#160; gridview: true,&#160; &#160; &#160; &#160; rowNum: 10000,&#160; &#160; &#160; &#160; sortname: &#39;id&#39;,&#160; &#160; &#160; &#160; treeGrid: true,&#160; &#160; &#160; &#160; treeGridModel: &#39;adjacency&#39;,&#160; &#160; &#160; &#160; ExpandColumn: &#39;name&#39;,&#160; &#160; &#160; &#160; caption: "Test"&#160; &#160; });</p>
</p>
<p><strong><span style="text-decoration: underline;">Adding data:</span></strong></p>
<p style="padding-left: 30px;">var row;</p>
<p style="padding-left: 30px;">for (var i = 0, l = mydataSrc.length; i &#60; l; ++i) {</p>
<p style="padding-left: 60px;">row = mydataSrc[i];</p>
<p style="padding-left: 60px;">grid.jqGrid (&#39;addChildNode&#39;, row.id, row.parent, row);</p>
<p style="padding-left: 30px;">}</p>
<p style="padding-left: 30px;">&#160;</p>
<p><strong><span style="text-decoration: underline;">My solution:</span></strong></p>
<p>In jquery.jqGrid.js did the following changes in addChildNode function</p>
</p>
<p>1)&#160;</p>
<p style="padding-left: 30px;">//parentdata[expanded] = true;</p>
<p>2)&#160;</p>
<p style="padding-left: 30px;">.find("div.tree-leaf").removeClass($t.p.treeIcons.leaf+" tree-leaf").addClass((parentdata[expanded] ? $t.p.treeIcons.minus+" tree-minus" : $t.p.treeIcons.plus+" tree-plus"));</p>
</p>
<p>3)&#160;</p>
<p style="padding-left: 30px;">//data[expanded] = false;</p>
<p style="padding-left: 30px;">if (data[expanded] === undefined) {</p>
<p style="padding-left: 60px;">data[expanded] = false;</p>
<p style="padding-left: 30px;">}</p>
<p style="padding-left: 30px;">&#160;</p></p>
]]></description>
        	        	<pubDate>Mon, 22 Oct 2012 15:45:12 +0300</pubDate>
        </item>
        <item>
        	<title>tony on addChildNode do not count on expanded parameter of the pow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27590</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27590</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>A grid (treegrid) configuration will help and how look your row?</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 22 Oct 2012 14:32:57 +0300</pubDate>
        </item>
        <item>
        	<title>rumax on addChildNode do not count on expanded parameter of the pow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27585</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addchildnode-do-not-count-on-expanded-parameter-of-the-pow#p27585</guid>
        	        	<description><![CDATA[<p>In case localdata, addChildNode do not count on expanded parameter of the pow and all rows are expanded.</p>
</p>
<blockquote>
<p>grid.jqGrid (&#39;addChildNode&#39;, row.id, row.parent, row);</p>
</blockquote>
]]></description>
        	        	<pubDate>Mon, 22 Oct 2012 10:43:41 +0300</pubDate>
        </item>
</channel>
</rss>