views:

152

answers:

1

Hi I have an AdvancedDataGrid tree with a ArrayCollection as its dataprovider. Now, for instance, i drag a leaf from one node to another node. To catch the event I'm adding a Listener to dragComplete.

advancedDG.addEventListener(DragEvent.DRAG_COMPLETE, dRAG_COMPLETE_Handler);

public function dRAG_COMPLETE_Handler(event: DragEvent):void{ var dropNode:Object = event.dropParent; <-- ??? }

My Problem: I want to know the new node where the leaf was dropped. Actually i would have expected that in the event there is a property like dropParent. This is not the case.

Sry for my bad English.

A: 

I would change the listener to dragDrop. Now your drag event will have a event.currentTarget, which is the item processing the dragDrop event you should be able to use this event.currentTarget to find the parent node you are looking for.

I hope I have understood your question correctly and that this helps. ~Mike

invertedSpear
I have tried that myself before. But in the source I'm getting an object with the whole ArrayCollection back. And i want simply have the node under that I've added the leaf.
Lukas Widmer