Drag and drop between DataGrid : DataGrid Drag Drop « Grid « Flex






Drag and drop between DataGrid

Drag and drop between DataGrid
       

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:HBox width="100%">
    <mx:VBox height="100%">
      <mx:Label text="My Music"/>
      <mx:DataGrid dragEnabled="true">
        <mx:columns>
          <mx:DataGridColumn headerText="Title" dataField="title"/>
          <mx:DataGridColumn headerText="Artist" dataField="artist"/>
        </mx:columns>
        <mx:dataProvider>
          <mx:ArrayCollection>
            <mx:Object songId="0" title="A" artist="AA" />
            <mx:Object songId="1" title="B" artist="BB" />
            <mx:Object songId="2" title="C" artist="CC" />
            <mx:Object songId="3" title="D" artist="DD" />
          </mx:ArrayCollection>
        </mx:dataProvider>
      </mx:DataGrid>
    </mx:VBox>
    <mx:VBox height="100%">
      <mx:Label text="Playlist"/>
      <mx:DataGrid dropEnabled="true">
        <mx:columns>
          <mx:DataGridColumn headerText="Title" dataField="title"/>
          <mx:DataGridColumn headerText="Artist" dataField="artist"/>
        </mx:columns>
      </mx:DataGrid>
    </mx:VBox>
  </mx:HBox>

</mx:Application>

   
    
    
    
    
    
    
  








Related examples in the same category

1.DataGrid accepting dragging and dropping from another DataGridDataGrid accepting dragging and dropping from another DataGrid
2.Handle dragEnter event for DataGridHandle dragEnter event for DataGrid
3.DataGrid drag enter eventDataGrid drag enter event
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