View Full Version : Tree - how to implement copy using CTRL KEY + Drag & Drop

20 Jun 2010, 6:22 AM
Sorry if this is absolutely basic question.
I would to have some hint, pointer, etc to understand if is possible to use the method normally used on desktop applications to copy a tree node doing drag & drop (D&D) (+ a KEY HOLD), instead of moving the node doing D&D
I need to have possibility to do following operations:
1. move using D& (already working)
2. copy using D&D

I've tried to read as much as possible without luck.

thanks a lot for your help.

20 Jun 2010, 11:19 AM
Listener in the destination tree:

listeners: {
beforenodedrop: function (obj) {
if (obj.rawEvent.ctrlKey) {
obj.dropNode = new Ext.tree.AsyncTreeNode(obj.dropNode.attributes);

11 Aug 2010, 9:35 AM
Ok, I will try and give you feedback