tree.findItem disabled autoload action at smartRender mode

Hi,

I am using the latest dhtmlxTree professional version (v.2.6 build 100916). I used following combination to handle a large set of folder tree:

tree.enableSmartRendering(true);
tree.setXMLAutoLoading(myphpcode);
tree.loadXML(myxmlfile); //all folders contain subfolders inside

I have a Find button for search:

Find

If the item I am searching for is already rendered (i.e., showing on the screen) then there is no problem to open the subfolder dynamically. But if the search item is below the rendered list, clicking the + (open folder) will cause a “beforeNode.tr is undefined” error. FireFox points the error in dhtmlxtree.js:

n.htmlNode.parentNode.parentNode.style.display=“none”;if ((beforeNode)&&(beforeNode.tr.nextSibling))

Any idea what is going on?

Thanks

The problem must be caused by usage of enableSmartRendering which is not very stable in case of complex use-cases.

If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

Problem solved. I added &&(beforeNode.tr) in dhtmlxtree.js :

n.htmlNode.parentNode.parentNode.style.display=“none”;if ((beforeNode)&&(beforeNode.tr) &&(beforeNode.tr.nextSibling))

Now everything works fine. It appears to be a minor code bug. Please fix it in your future release.

The only problem I have now is that the enableSmartRendering doesn’t work in IE browser when the dateset (root folders) is very large (> 1000). But that is a separate topic.