Jul 14, 2011, 2:27 PM
[CLOSED] Drag and drop from treepanel to treepanel in "copy" mode
Hi,
Is there a way to set the behavior of drag/drop between 2 treepanels so that the nodes are copied (including child nodes) rather than moved?
Edit:
I should add I'm using a "MultiSelectTreePanel", so I could be dragging a set of nodes.
Unless theres an easier way, I think I need to clone the nodes and add them to the new treepanel, something like
Thanks
Matt
Is there a way to set the behavior of drag/drop between 2 treepanels so that the nodes are copied (including child nodes) rather than moved?
Edit:
I should add I'm using a "MultiSelectTreePanel", so I could be dragging a set of nodes.
Unless theres an easier way, I think I need to clone the nodes and add them to the new treepanel, something like
<Listeners>
<BeforeNodeDrop Fn="ScuControllers.handleNodeDrop"></BeforeNodeDrop>
</Listeners>
handleNodeDrop: function (node) {
console.log(node);
var clonedNodesArray = jQuery.extend({}, node.dropNode);
node.dropNode = clonedNodesArray;
return true;
}
Although at the moment I'm not having much joy.Thanks
Matt
Last edited by Daniil; Jul 18, 2011 at 2:56 PM.
Reason: [CLOSED]