Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by MaxM on Oct 14, 2009 07:09
open dhtmlx forum
Drag inside treeGrid opens dragged and neigbour nodes.

Hi

A small question - unfortunatelly I can't find an answer for.

DHTMLXTreeGrid v 2.0Pro
Enabled sibling drag method.
Dragging inside same grid - simply changing order of the node.

Dragged node containing child nodes.

When I put it between nodes A & B - node A and just dragged node are expanded.

How can I deprecate this - so that node is just dragged into necassary place and that's all.


Thanks in advance.

Answer posted by Stanislav (support) on Oct 14, 2009 08:53
You can add next line to the init, and block unwanted behavior

grid._autoOpenItem=function(){};
Answer posted by MaxM on Oct 19, 2009 07:28
Thank you - this works well. Now when I drag and still for some time over a node - it is not opened.

But it does not take effect to the following:
when I change the order of the node (drag it between two other nodes) - the node before and just dragged node are opened immediatelly after I drop dragged node.

Is it possible to depricate this as well?
Answer posted on Oct 19, 2009 08:53
You can try to add the next code 

grid.attachEvent("onDrag",function(){
       grid._event_id = grid.attachEvent("onOpenStart",function(){ return false; })
       return true;
})
grid.attachEvent("onDrop",function(){
       grid.detachEvent(grid._event_id);
       return true;
})