<?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 delete previous loaded local data if loadonce:true are used</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/treegrid-delete-previous-loaded-local-data-if-loadoncetrue-are-used</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/treegrid-delete-previous-loaded-local-data-if-loadoncetrue-are-used/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on TreeGrid delete previous loaded local data if loadonce:true are used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/treegrid-delete-previous-loaded-local-data-if-loadoncetrue-are-used#p26247</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/treegrid-delete-previous-loaded-local-data-if-loadoncetrue-are-used#p26247</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>during analysing of the problem described in <a href="http://stackoverflow.com/q/9909394/315935" target="_blank">the answer</a>&#160;I found out that <a href="https://github.com/tonytomov/jqGrid/blob/v4.3.1/js/grid.base.js#L1256-1257" target="_blank">the lines of code</a>&#160;follows to removing on previous loaded data (like tree root elements) on expanding of any node. To fix the problem I suggest to set <strong>loadonce</strong> to <strong>false</strong> inside of <a href="https://github.com/tonytomov/jqGrid/blob/v4.3.1/js/grid.treegrid.js#L127" target="_blank">setTreeGrid</a> together with other settings of jqGrid parameters. For example one can add the line</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5319' value='Select Code' data-codeid='sfcode5319' /></p>
<div class='sfcode' id='sfcode5319'><strong>$t.p.loadonce&#160;=  false;</strong></div>
<p>after <a href="https://github.com/tonytomov/jqGrid/blob/v4.3.1/js/grid.treegrid.js#L134" target="_blank">the line </a></p>
<p><input type='button' class='sfcodeselect' name='sfselectit5565' value='Select Code' data-codeid='sfcode5565' /></p>
<div class='sfcode' id='sfcode5565'>$t.p.gridview =  true;</div>
<p>Altrnativly one can add <strong>!ts.p.treeGrid</strong> in&#160;<a href="https://github.com/tonytomov/jqGrid/blob/v4.3.1/js/grid.base.js#L1043" target="_blank">the line</a> and <a href="https://github.com/tonytomov/jqGrid/blob/v4.3.1/js/grid.base.js#L1239" target="_blank">the line</a>. So the lines will be like</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9581' value='Select Code' data-codeid='sfcode9581' /></p>
<div class='sfcode' id='sfcode9581'>locdata = (ts.p.datatype != &#34;local&#34; &#38;&#38; ts.p.loadonce<strong> &#38;&#38; !ts.p.treeGrid</strong>) &#124;&#124; ts.p.datatype == &#34;xmlstring&#34;,</div>
<p>and</p>
<p><input type='button' class='sfcodeselect' name='sfselectit861' value='Select Code' data-codeid='sfcode861' /></p>
<div class='sfcode' id='sfcode861'>locdata = (ts.p.datatype != &#34;local&#34; &#38;&#38; ts.p.loadonce<strong> &#38;&#38; !ts.p.treeGrid</strong>) &#124;&#124; ts.p.datatype == &#34;jsonstring&#34;;</div>
<p>Best regards</p>
<p>Oleg</p>
]]></description>
        	        	<pubDate>Wed, 28 Mar 2012 19:55:33 +0300</pubDate>
        </item>
</channel>
</rss>