dhtmlxTree: Is there a way to allow drag and drop only for c

Hello,



I’m looking for a way to only allow drag and drop into certain nodes. For example, I have two trees. The user can drag items from the left tree into the right tree. However, I only want the user to be able to drag those items into certain folders.



Is this possible? Thanks.



-Smith

You can use onDragIn event ( the next article dhtmlx.com/docs/products/dhtmlxG … rid_mandnd describes details of d-n-d of grid, but tree has the same events , so the same solution can be used )

target_tree.attachEvent(“onDragIn”,function(sid,tid){ //sid - draged element id, tid - drop landing id
if (some_custom_rules(sid,tid)) //check if d-n-d allowed
return true; // allow
else
return false; //or deny
})