How to drag and drop a node from tree keeping the Copy in the list

hi,
Can anybody get me the code to keep a COPY of the node in a list of a tree after drag and drop ?

i had tried with the snippet

TreeGrid.setDragDataAction(DragDataAction.COPY);

but failed to yeild the desired result…
thanks in adv.

-Vijay

More details please. What do you mean by fails. Is there an error? Best to post a standalone testcase. See this post on how to get help.

Sanjiv

fails means…
i cannot hold a copy of the node in the list from where it is draged..

Again i will try to explain more …

I have tree filled with lists or groups… say for Example .. employess under various departments.
When i try to drag one employee from one department to another department I wish to hold that particular employee at both the departments. i.e. the employee should present in both the lists.

But as per current function.. whenever an employee is dragged from a list (origin) it is deleted from that list and added to the list(destination) where it is dropped.

Can I have a copy of the dragged employee in the list(origin).

This seems to work in quick tests. Please post a standalone example of the problem.

Test Case:
I had Three Departments and its members represented in tree structure

The departments are

  1. Advertisement
    Members are A, B , C
  2. Finance
    Members are D, E, F
  3. Production
    Members are G, H, I

What I like to get is…

When I drag the node ‘B’ from ‘Advertisement’ Department and drop at Production Department, I should have the Node ‘B’ at both the Departments. Hence the ‘Production’ deparment should have the members as B,G,H,I.
The ‘Advertisement’ Department MUST also have the member ‘B’ (Which is dragged)

A standalone examply means showing code. This text diagram helps us understand what you want, but not why your code isn’t working just like the samples work.

the example in showcase is insuffice to my need…
as said earlier
TreeGrid.setDragDataAction(DragDataAction.COPY);

did not cater my need.

-vijay

A standalone example means showing code.