This content has been marked as final. Show 7 replies
Yes, you can interwine the two. I've done something similar, except in my case I
was working with a datagrid and a tree and I needed to override the default behavior for the tree.
Just use dragEnabled="true" for the datagrid.
Then for the Image define functions for the dragEnter and dragDrop events (and any of the other drag events, if you need to).
<mx:Image width="100" height="100" dragEnter="doEnter(event)" dragDrop="doDrop(event)" />
private function doEnter(event:Event):void
private function doDrop(event:Event):void
// your code here
Be sure to add:
It's exactly what I did... worked out great!
It wasn't as complicated as I thought it would be.
I'm trying to use this to drag from a datagrid to a tree control, but the tree control will not accept the items. Can you please post the code you got to work?
the code above should work, the documentation should explain what events the treecontrol has in regards to the drag and drop.
Thanks. I tried it, but the doEnter event won't fire.
Here's what I have in there:
Should it be something other than Tree?
I'm having the same problem as Mario. The dragDrop event won't fare when dragging from a Datagrid.
I have similar problem and my requirement is a bit different. I want to drag one row from one datagrid and drop it to another datagrid by splitting it into two and vice versa. But the problem I am facing is that it adds the original row each time along with the two split rows.
I am modifying the dataProvider here but could not figure out how to override this default behavior. Can anyone please help in resolving this issue?