makeDraggable without enableDragAndDrop

Hi,

I have a tree without drag&drop in the tree.

But i want to drag some items into the tree. I use makeDraggable but it workes only if enableDragAndDrop is also true.

Is there a solution for this problem ?

Thx

Daschmi

tree.enableDragAndDrop("temporary_disabled");

As result , tree will not have active DND, but will be DND aware.

Mmmh Thanks Stanislav,

I tried it, but it worked for me.

My DHTMLXTREE Version : //v.2.6 build 100722

My code (I load the xml with ajax and prototype):

[code] // Alten Baum löschen
document.getElementById(‘treeBox’).innerHTML = “”;
tree = new dhtmlXTreeObject(document.getElementById(‘treeBox’),“100%”,“100%”,0);
tree.setImagePath(“inc/dhtmlxtree/imgs/”);
//tree.enableDragAndDrop(true); //works
tree.enableDragAndDrop(“temporary_disabled”); // didn’t work

            //tree.loadCSVString(transport.responseText);
            tree.loadXMLString(transport.responseText);
            tree.attachEvent("onClick", NodeSelect);

[/code]

Any Idea ?

You may try to use the following to disable drag-n-drop of the tree items, but allow to drop other elements:

tree.enableDragAndDrop(true); tree.attachEvent("onDragIn",function(sid,tid,sobj,tobj){ return sobj!=tree });

Hi Alexandra,

It works ! Thanks a lot.

Daschmi