cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop - Not able to get data

Sharathmg
Active Contributor
0 Kudos

Hello All,

I am having a requirement to drag a data from the org tree UI element into a table. It is used to drag the cost center value from Tree into a table.

I have assigned the dragtargetinfo to table and dragsource to Tree. I have also created the parameters for the onDrop event:

offset, nodelement, tags, mime etc. The action is assigned to table(target) and parameter mapping is performed. But, when I check for the data in the onDrop action mdethod, the data recieved is null.

I have been trying many combinations but I was only able to retrieve one context property using the property of the dragsource but I need the element.

Also, I need to drop the element into a cell and not between the rows. As of now, there is line which appears when i drag from tree to table. How do i achieve this behavior?

Kindly help me in resolving these issues.

Thank you.

Regards,

Sharath

Accepted Solutions (0)

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

Hello,

Most pices of the drag and drop are solved. But, I am faced with one issue.

In my scenario, I need to drag the leaf from the organizational hierarchy into the drag source table. I have a created an action param of type IWDNodeElement and mapped it to table onDrop event. According the API doc, it should return me the node element from the drag source. But, it returns me NULL. I used the property "data" of the DragSourceInfo. It returns me the top node of the tree but not the actual leaf which I have selected.

I need to get the leaf in the tree when the onDrop event is triggerred. Any clue or reason behind this strange behavior?

Thank you.

Regards,

Sharath M G