Hi,
I want to create drag and drop functionality in Flex2 Beta 3.
In this User can drag data from Datagrid into the List.
And I want to Store all the data of the List in an Array.
So can anybody please tell me that how can i achieve this.
Below is code for the reference
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.events.DragEvent;
import mx.controls.Alert;
[Bindable]
public var myDragArr:Array=["sumeet","Ashish","Raj","Karuna"]
public var myDropArr:Array=["Group1"]
public function dragDrop_handler(event:DragEvent)
{
event.preventDefault()
}
]]>
</mx:Script>
<mx:DataGrid x="33" y="33" width="231" dragEnabled="true" dataProvider="{myDragArr}">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
</mx:columns>
</mx:DataGrid>
<mx:List x="399" y="56" width="122" height="95" dropEnabled="true" dataProvider="{myDropArr}" dragDrop="dragDrop_handler(event)"/>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.events.DragEvent;
import mx.controls.Alert;
[Bindable]
public var myDragArr:Array=["sumeet","Ashish","Raj","Karuna"]
public var myDropArr:Array=["Group1"]
public function dragDrop_handler(event:DragEvent)
{
event.preventDefault()
}
]]>
</mx:Script>
<mx:DataGrid x="33" y="33" width="231" dragEnabled="true" dataProvider="{myDragArr}">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
</mx:columns>
</mx:DataGrid>
<mx:List x="399" y="56" width="122" height="95" dropEnabled="true" dataProvider="{myDropArr}" dragDrop="dragDrop_handler(event)"/>
</mx:Application>
Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

