Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by abhishek on Aug 26, 2009 23:39
open dhtmlx forum
DHTMLXTree enable drag functionality on node basis rather than complete tree

enable drag functionality on node basis rather than complete tree..........

I want only particular node of a tree draggable.........and dragged node can be dropped on other nodes of a tree

need help...thanks
Answer posted by Alex (support) on Aug 27, 2009 02:25

You can use onDrag event to control drag-n-drop. If onDrag event handler returns true, the operation is confirmed. And it will be denied in the other case.

For example:

tree.attachEvent("onDrag",doOnDrag);

function doOnDrag(sourceId,targetId,beforeId,sourceTree,targetTree){

   if(sourceId == "some_allowed_id") return true

}