Setting the dragMoveEnabled property to move instead of copy : Drag Drop « Development « Flex






Setting the dragMoveEnabled property to move instead of copy

Setting the dragMoveEnabled property to move instead of copy
          
<?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" dragMoveEnabled="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.Dragging and dropping within a component, to allow orderingDragging and dropping within a component, to allow ordering
2.Create DragSource object and add data to itCreate DragSource object and add data to it
3.Performing a two-way drag and dropPerforming a two-way drag and drop
4.Dragging and dropping in the same controlDragging and dropping in the same control
5.The drag initiators, and drop targetThe drag initiators, and drop target
6.Get Drag source data formatGet Drag source data format
7.Press control key as drag and dropPress control key as drag and drop
8.Canvas Drag and DropCanvas Drag and Drop
9.Specifying the drag indicator by using the DragSpecifying the drag indicator by using the Drag
10.Specify a Drag ProxySpecify a Drag Proxy
11.Enable and Disable Drag OperationsEnable and Disable Drag Operations
12.Drag Drop To ComponentDrag Drop To Component
13.Set liveDragging to true to dispatch change event continuously as moving the thumbSet liveDragging to true to dispatch change event continuously as moving the thumb
14.Get drag source from DragEventGet drag source from DragEvent
15.Canvas drag enter eventCanvas drag enter event
16.Explpicitly handle the dragOver eventExplpicitly handle the dragOver event