Drag and Drop Between Lists : List Drag Drop « Components « Flex






Drag and Drop Between Lists

Drag and Drop Between Lists
           

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" creationComplete="creationHandler();">
    <mx:Script>
        
            import mx.collections.ArrayCollection;

            private function creationHandler():void
            {
                contactList.dataProvider = new ArrayCollection([
                {label:'A', phone:'555.111.2222'},
                {label:'B', phone:'555.333.4444'},
                {label:'C', phone:'555.777.8888'}
                ]);
            }
      
    </mx:Script>

    <mx:Panel title="Contact List:" width="200" height="200">
        <mx:List id="contactList" width="100%" height="100%"
            dragEnabled="true"
            dropEnabled="true"
            dragMoveEnabled="false"
            />
    </mx:Panel>
    <mx:Panel title="Contact Info:" width="300" height="200">
        <mx:DataGrid id="contactGrid" width="100%" height="100%"
            dragEnabled="true"
            dropEnabled="true"
            dragMoveEnabled="true">
            <mx:columns>
                <mx:DataGridColumn dataField="label" headerText="Name"/>
                <mx:DataGridColumn dataField="phone" headerText="Phone"/>
            </mx:columns>
        </mx:DataGrid>
    </mx:Panel>

</mx:Application>
    

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Dragging and dropping among three List componentsDragging and dropping among three List components
2.Drag-and-drop lets you move items from one List control to anotherDrag-and-drop lets you move items from one List control to another
3.Drag drop to copy between two ListsDrag drop to copy between two Lists
4.List dropEnabled="true" ,dragMoveEnabled="true"List dropEnabled=
5.Drag And Drop List SampleDrag And Drop List Sample
6.Drag and Drop Within a ListDrag and Drop Within a List
7.Drag-and-drop to move items from one MX List control to anotherDrag-and-drop to move items from one MX List control to another
8.Drag and drop to item in List To another ListDrag and drop to item in List To another List
9.List To List Drag and DropList To List Drag and Drop