<?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 bug of cant collapse node, XML from server.</title>
	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server</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-bug-of-cant-collapse-node-xml-from-server/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>cocinerox on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19135</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19135</guid>
        	        	<description><![CDATA[<p>Thanks,&#160;jmorquecho! I had the same problem tonight, google brought me here, and your patch works for me.&#160;<img class="spSmiley" style="margin:0" title="Laugh" src="/blog/wp-content/forum-smileys/sf-laugh.gif" alt="Laugh" /></p>
]]></description>
        	        	<pubDate>Sat, 14 Aug 2010 05:28:08 +0300</pubDate>
        </item>
        <item>
        	<title>jmorquecho on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19124</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19124</guid>
        	        	<description><![CDATA[<p>Hello Guys</p>
<p>I had the same problem and I found a solution that work for me, I think this is a bug in the grid.treegrid.js these are the details:</p>
<p>1. I&#39;m using the jquery 1.4.2 and jqGrid 3.7.2, (I checked the last download available today and have the same problem in the grid.treegrid.js file)</p>
<p>2. I declare my treegrid like in the demos, i&#39;m using "adjacency" model and json data type.</p>
<p>3. My problem was that the nodes expands with no problems, but when I try to collapse the node just do nothing.<br />After a long and detailed debugging, I found that in line 238 col 54 of the grid.treegrid file : <em><strong>if(this[parent_id] == rc.id)</strong></em>&#160; always compare each node <em>id </em>with the colapsing node <em>id</em>, but at this point <strong>rc.id</strong> has <em>undefined</em> value. If you chek the <strong><em>rc</em></strong> objetc it doesn&#39;t have the atrtibute <em>id</em>. I supouse that the attributes comes from <strong><em>$t.p.localReader.id</em></strong>, which has the value <em>_id_.</em>&#160; So, I change the code for something like this:</p>
<p><em><strong>if(this[parent_id] == rc[$t.p.localReader.id])</strong></em>.</p>
<p>And the magic of the treeGrid comes back to alive.</p>
</p>
<p>Hope this help to the developers to fix the problem and deploy soon the correction.</p>
</p>
<p>cheers</p>
<p><img class="spSmiley" style="margin:0" title="Wink" src="/blog/wp-content/forum-smileys/sf-wink.gif" alt="Wink" />&#160;</p>
]]></description>
        	        	<pubDate>Fri, 13 Aug 2010 19:57:34 +0300</pubDate>
        </item>
        <item>
        	<title>gdboling on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19116</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19116</guid>
        	        	<description><![CDATA[<p>I&#39;m having the exact same issue with both JSON and XML data....</p>
</p>
<p><a href="http://stackoverflow.com/questions/3473274/jqgrid-treegrid-loadonce-and-other-issues" rel="nofollow" target="_blank"><a href="http://stackoverflow.com/quest" rel="nofollow">http://stackoverflow.com/quest</a>.....her-issues</a></p>
]]></description>
        	        	<pubDate>Fri, 13 Aug 2010 04:39:49 +0300</pubDate>
        </item>
        <item>
        	<title>ivanchain on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19047</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p19047</guid>
        	        	<description><![CDATA[<p>Nicolas, thank you for your reply.</p>
</p>
<p>But I think the "&#60;cell /&#62;" is the abbreviations of "&#60;cell&#62;&#60;/cell&#62;".</p>
</p>
<p>In fact, in my server code, I don&#39;t use anything like "&#60;cell/&#62;", but like: "&#60;cell&#62;" +n_lvl.ToString() + "&#60;/cell&#62;";&#160;</p>
<p>Just join the XML into a string, and then use:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Response.Clear();<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; Response.ContentType = "text/xml";<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; Response.Write(xmlString);<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; Response.End();</p>
<p>to return the XML to the grid side.&#160; The Response.Write() automatically change the "&#60;cell&#62;&#60;/cell&#62;" to the "&#60;cell /&#62;".</p>
</p>
<p>Do you mean jqgrid will not see the &#60;cell /&#62; as a normal XML? That cause my problem?&#160; But the same xml works fine in jqgrid 3.6</p>
</p>
<p>yours</p>
<p>Ivan</p>
]]></description>
        	        	<pubDate>Tue, 10 Aug 2010 17:59:23 +0300</pubDate>
        </item>
        <item>
        	<title>niclarcipretti on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p18949</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p18949</guid>
        	        	<description><![CDATA[<p>Hi Ivan,</p>
</p>
<p>There&#39;s a problem with the XML data you are returnin to the grid, whenever you see this kind of behavior in your tree grid, double check the JSON or XML data that you are returning cause its probably wrong.</p>
<p>Seeing your code, I could notice the following errors in your XML data (in red):</p>
</p>
<p>&#60;?xml version="1.0&#8243; encoding="utf-8&#8243; ?&#62;</p>
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri%20Jul%2030%2012:18:46%20UTC+0800%202010" onfocus="h()" target="_blank">-</a> &#60;rows&#62;</div>
<div class="e">
<div>&#160; &#60;page&#62;1&#60;/page&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;total&#62;1&#60;/total&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;records&#62;1&#60;/records&#62;</div>
</div>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri%20Jul%2030%2012:18:46%20UTC+0800%202010" onfocus="h()" target="_blank">-</a> &#60;row&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;cell&#62;5&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;tesstname1&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; <span style="color: #ff0000;"><strong>&#60;cell /&#62;</strong></span></div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div>&#160; &#60;/row&#62;</div>
</div>
</div>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri%20Jul%2030%2012:18:46%20UTC+0800%202010" onfocus="h()" target="_blank">-</a> &#60;row&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;cell&#62;6&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;tesstname2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; <strong><span style="color: #ff0000;">&#60;cell /&#62;</span></strong></div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div>&#160; &#60;/row&#62;</div>
</div>
</div>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri%20Jul%2030%2012:18:46%20UTC+0800%202010" onfocus="h()" target="_blank">-</a> &#60;row&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;cell&#62;7&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;tesstname3&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; <span style="color: #ff0000;"><strong>&#60;cell /&#62;</strong></span></div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div>&#160; &#60;/row&#62;</div>
</div>
</div>
<div>&#160; &#60;/rows&#62;</div>
</p>
<p>Hope you can figure out what&#39;s wrong in the XML data generation.</p>
</p>
<p>Regards</p>
</p>
<p>Nicolas</p>
]]></description>
        	        	<pubDate>Tue, 03 Aug 2010 19:49:41 +0300</pubDate>
        </item>
        <item>
        	<title>ivanchain on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p18879</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p18879</guid>
        	        	<description><![CDATA[</p>
<p>And another problem:</p>
</p>
<p>&#160;var grid = jQuery("#list1");<br />&#160;var olapkey = grid.getGridParam("selrow");</p>
<p>&#160;var record =grid.getRowData(olapkey);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>alert(olapkey);&#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;&#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;<br />&#160;alert(grid.getNodeDepth(record));</p>
</p>
<p>in the above code, list1 is the same grid in my post above, olapkey could show correctly, point to the current selected row. But the grid.getNodeDepth(record) always return 0.</p>
</p>
<p>&#160;Above code work well with jqgrid 3.6, but has problem in jqgrid 3.7</p></p>
]]></description>
        	        	<pubDate>Fri, 30 Jul 2010 07:58:43 +0300</pubDate>
        </item>
        <item>
        	<title>ivanchain on treegrid bug of cant collapse node, XML from server.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p18877</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/treegrid-bug-of-cant-collapse-node-xml-from-server#p18877</guid>
        	        	<description><![CDATA[<p>Hi, I just do an update from jgrid 3.6 to current 3.7, and found the treegrid could not work.</p>
<p>when I expand and read data from server , everything is OK, but when I click the node again(try to collapse it), the image icon showed the collapsed icon, but the data row is still there, and when I click the node again, it load the repeated record out again.</p>
</p>
<p>This is my code:</p>
<p>var dt = new Date();</p>
<p>jQuery("#list1").jqGrid({<br />&#160;&#160;&#160; treeGrid: true,<br />&#160;treeGridModel : &#39;adjacency&#39;,<br />&#160;ExpandColumn : &#39;MainDemoName&#39;,<br />&#160;ExpandColClick : true,<br />&#160;&#160; &#160;url: "/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess" +&#160; "&#38;rand="+ dt&#160;&#160; ,<br />&#160;datatype: "xml",<br />&#160;mtype: "GET",<br />&#160;&#160; &#160;colNames:["OLAPKey","MainDemoName","Script"],<br />&#160;&#160; &#160;colModel:[<br />&#160;&#160; &#160;&#160;{name:&#39;OLAPKey&#39;,index:&#39;OLAPKey&#39;, width:1,hidden:true,key:true},<br />&#160;&#160; &#160;&#160;{name:&#39;MainDemoName&#39;,index:&#39;MainDemoName&#39;, width:280},<br />&#160;&#160; &#160;&#160;{name:&#39;Script&#39;,index:&#39;Script&#39;, width:1,hidden:true}<br />&#160;&#160; &#160;],<br />&#160;height:&#39;auto&#39;,<br />&#160;pager : "#pager1"<br />&#160;<br />});</p>
<p>The XML data return from server is:</p>
<p>&#60;?xml version="1.0" encoding="utf-8" ?&#62;</p>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri Jul 30 12:18:46 UTC+0800 2010" onfocus="h()" target="_blank">-</a> &#60;rows&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;page&#62;1&#60;/page&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;total&#62;1&#60;/total&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;records&#62;1&#60;/records&#62;</div>
</div>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri Jul 30 12:18:46 UTC+0800 2010" onfocus="h()" target="_blank">-</a> &#60;row&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;cell&#62;5&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;tesstname1&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell /&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div>&#160; &#60;/row&#62;</div>
</div>
</div>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri Jul 30 12:18:46 UTC+0800 2010" onfocus="h()" target="_blank">-</a> &#60;row&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;cell&#62;6&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;tesstname2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell /&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div>&#160; &#60;/row&#62;</div>
</div>
</div>
<div class="e">
<div class="c"><a class="b" onclick="return false" href="http://192.168.1.100/KPIGetData/DimData.aspx?SearchInput=dimtrucfortreegrid&#38;DimName=ProductProcess&#38;nodeid=2&#38;n_level=1&#38;rand=Fri Jul 30 12:18:46 UTC+0800 2010" onfocus="h()" target="_blank">-</a> &#60;row&#62;</div>
<div>
<div class="e">
<div>&#160; &#60;cell&#62;7&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;tesstname3&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell /&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;2&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div class="e">
<div>&#160; &#60;cell&#62;false&#60;/cell&#62;</div>
</div>
<div>&#160; &#60;/row&#62;</div>
</div>
</div>
<div>&#160; &#60;/rows&#62;</div>
<div>Please help,&#160; the code above work well in jqgrid 3.6</div>
<div>yours,</div>
<div>Ivan</div>
</div>
</div>
]]></description>
        	        	<pubDate>Fri, 30 Jul 2010 07:44:13 +0300</pubDate>
        </item>
</channel>
</rss>