DataGrid accepting dragging and dropping from another DataGrid : DataGrid Drag Drop « Grid « Flex






DataGrid accepting dragging and dropping from another DataGrid

DataGrid accepting dragging and dropping from another DataGrid
       
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    backgroundColor="white">
    <mx:Script>
        
        import mx.collections.ArrayCollection;
        [Bindable]
        public var myAC:ArrayCollection = new ArrayCollection([
            {name:"A", email:"j@domain.com",url:"http://www.f.com"},
            {name:"B", email:"t@domain.com",url:"http://www.d.com"},
            {name:"C", email:"a@domain.com",url:"http://www.a.com"},
            {name:"D", email:"f@domain.com",url:"http://www.g.com"},
            {name:"E", email:"f@domain.com",url:"http://www.w.com"}
        ]);
      
    </mx:Script>
    <mx:DataGrid id="dgSource" dataProvider="{myAC}"
        dragEnabled="true">
        <mx:columns>
            <mx:DataGridColumn dataField="name" headerText="Contact Name" width="300" />
            <mx:DataGridColumn dataField="email" headerText="E-Mail" width="200" />
            <mx:DataGridColumn dataField="url" headerText="URL" width="200" />
        </mx:columns>
    </mx:DataGrid>
    <mx:DataGrid id="dgTarget" dropEnabled="true">
        <mx:columns>
            <mx:DataGridColumn dataField="name" headerText="Contact Name" width="300" />
            <mx:DataGridColumn dataField="email" headerText="E-Mail" width="200" />
            <mx:DataGridColumn dataField="url" headerText="URL" width="200" />
        </mx:columns>
    </mx:DataGrid>
</mx:Application>

   
    
    
    
    
    
    
  








Related examples in the same category

1.Handle dragEnter event for DataGridHandle dragEnter event for DataGrid
2.DataGrid drag enter eventDataGrid drag enter event
3.Drag and drop between DataGridDrag and drop between DataGrid
4.Drag and move between DataGridDrag and move between DataGrid
5.Get drag initiator DataGrid from DragEventGet drag initiator DataGrid from DragEvent
6.DataGrid drag and dropDataGrid drag and drop
7.drag and move DataGrid itemsdrag and move DataGrid items
8.DataGrid drag and drop eventDataGrid drag and drop event
9.Drag and drop from List to DataGridDrag and drop from List to DataGrid
10.Drag an Image to DataGrid and do calculation based on new added itemDrag an Image to DataGrid and do calculation based on new added item
11.Drag and drop rows from either DataGrid control to the otherDrag and drop rows from either DataGrid control to the other
12.Move or copy data from a Spark List control to an MX DataGrid control by drag and dropMove or copy data from a Spark List control to an MX DataGrid control by drag and drop