Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Miguel Cabra cabra on Sep 24, 2009 08:15
open dhtmlx forum
dhtmlXTreeObject click event handler very slow

Hi,

I am using this piece of code to create my tree and I have an event handler for the click event:

o.mytree = SolApp.layoutContent.cells('b').attachTree();
o.mytree.setImagePath('DHTMLX/codebase/imgs/');
o.mytree.enableDragAndDrop(false);
o.mytree.enableItemEditor(false);
o.mytree.enableSmartXMLParsing(true);
o.mytree.setOnClickHandler(o.treeNodeSelect);
o.mytree.loadXML('Application/XMLTreeMap.xml');

I have this problem the first time I click the tree the event trigger in less than one second but after that is necessary unless three or four seconds. Why is thihs?

Thanks
Answer posted by Alex (support) on Sep 24, 2009 08:41

Hello,

do you use the latest layout and tree version ?

There was actually some issue with tree inside layout. But it has been fixed in the 2.5 version.

 

Answer posted by Miguel on Sep 25, 2009 03:29
Curently we are using the version 2.1. Sometimes takes ages the click event and I am doing only this

 treeNodeSelect: function(evt) {

        document.getElementById('text').innerHTML = 'Please wait';
        setTimeout("document.getElementById('text').innerHTML = ''", 1500);
       
       }


Only to chek the time that takes the treenode event. With the latest version is this fixed?

Answer posted by Alex (support) on Sep 25, 2009 07:19

Hello, 

you didn't provided a complete demo. So, we can not test it.

But you can download the new layout package from our website  (it is compatiible with tree 2.1) and test component with your application:

http://www.dhtmlx.com/docs/products/dhtmlxLayout/samples/04_components/01_tree.html