Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by oVox on Mar 18, 2008 17:03
open dhtmlx forum
Drag & Drop

HI!, im building a tree and a grid where i need to drag from grid to tree.
I need to catch the event "before drop" on tree...because i need to validate the the Tree Node where tjhis Drop is going to happend.
How can i solve this?

Regards,
Answer posted by Support on Mar 19, 2008 02:45
You can use next code
    tree.attachEvent("onDragIn",function(sid,tid){
       //this event occurs before drop, when item dragged over potential target
       // tid - id of tree item or null if item draged over free space of tree
       if (!some_rule_check(tid)) return false; // block d-n-d
       return true;
    });