如何获取所选项目拖动;掉落组件?

时间:2009-12-02 11:36:42

标签: flex

How to get all the selected items from in this below  code selectedContsList ?
<mx:DataGrid id="dg" dataProvider="{cNumbersList}"  allowMultipleSelection="true" dropEnabled="true" dragMoveEnabled="true" >
    <mx:columns>
    <mx:DataGridColumn dataField="contactName" headerText="Name"/>
 <mx:DataGridColumn dataField="contactNo" eaderText="ContactNo"/>               
    </mx:columns>

    <mx:Label text="Selected Contacts :"  width="122" color="#C90855" height="16"/>
<mx:DataGrid id="selectedContsList"  allowMultipleSelection="true"  dragMoveEnabled="true" dragEnabled="true" >
         <mx:columns>
         <mx:DataGridColumn dataField="contactName" headerText="Name"/>
         <mx:DataGridColumn dataField="contactNo" headerText="ContactNo"/>              
         </mx:columns>
</mx:DataGrid>

1 个答案:

答案 0 :(得分:0)

以下是什么问题?

<mx:DataGrid id="selectedContsList" dataProvider="{dg.selectedItems}" allowMultipleSelection="true" dragMoveEnabled="true" dragEnabled="true" >

假设那是你要求的当然......