DHTMLXTree: enableDragAndDrop()

How come every time I click on the tree I get an “no such object or method” exception but just by removing this property

tree.enableDragAndDrop(true, false);

the problem disappears?

What’s going on behind? How to solve this issue?

After enableDragAndDrop command item react on mousedown action ( it track mouse gestures to start d-n-d operation ), but it is pretty safe code, which must not cause such error.
If problem still occurs for you - please send any kind of sample where problem can be reconstructed ( you can send it directly to support@dhtmlx.com)

Here is what happens;

I declare  a tree and temporary put the d&d property on hold;

tree=new dhtmlXTreeObject(‘treeBox’,“100%”,“100%”,<%=jRootId%>);
tree.enableDragAndDrop(“temporary_disabled”, false);

In the loadInitialPage based on some exterior parameter I decide to make allow the tree to be dynamic;

if (myCoreBusinessLogic) {
       tree.enableDragAndDrop(true, false);


Whenever I comment that line everything runs fine, but with no d&d of course; With that instruction on,  the tree works until an item gets dragged. When the left button of the mouse gets clicked and the item starts to be dragged, the above mentioned exception arises and no drag and drop action whatsoever happens.

I have no idea why it happens that way, but I suspect something might got wrong in the libraries. Any ideas?

Please check attached sample, it uses the same code and works fine.

1207647472.zip (42.1 KB)

I found the problem…

dhtmlxtree_dd.js scrumbled the drag&drop functionnality as it was included in the imported scripts;