SmartRendering + SmartRefreshBranch Problem

Hello,

i have a problem using smartRefreshBranch and smartRendering together, after the smartRefreshBranch the invisible nodes are not longer available, example can you find here:
michaeldoehler.de/labs/dhtmlx/

Thx
Michael

Hello Michael,

Smart Rendering isn’t compatible with dinamic loading. And moreover smartRefreshBranch can not be used with dinamic loading. smartRefreshBranch requires all brach is loaded completely and child attribute isn’t applied in this case.

There are possible solutions:

  1. Using dynamic loading, but you should use Distributed Parsing instead of Smart Rendering and tree reloading with preserved open states instead of smartRefreshBranch.

tree.enableDragAndDrop(true);
tree.enableDistributedParsing(true,10,100);
tree.setXMLAutoLoading(‘tree.php’);
tree.loadXML(‘tree.php’);

function refresh(){
tree.saveOpenStates(“os”);
var h = tree.attachEvent(“onXLE”,function(){
tree.detachEvent(h);
tree.loadOpenStates(“os”);
})
tree.deleteChildItems(0)
tree.loadXML(‘tree.php’);
}
Methods saveOpenStates and loadOpenStates require dhtmlxtree_xw.js

  1. using Smart XML Parsing or Smart Rendering instead of dynamic loading - in this case all data is loaded at once.