DataGrid To DataGrid

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
 <mx:Script>
  <![CDATA[
   import mx.collections.*;
   [Bindable]
   private var _Array:Array= new Array({Product:"Fuji Apple", Price:89,LowFat:"Yes",Orgainc:"No"},{Product:"Navol Orangle", Price:0.43,LowFat:"Yes",Orgainc:"No"},{Product:"Romain Lettuce", Price:1.25,LowFat:"Yes",Orgainc:"Yes"},{Product:"Spinach", Price:0.49,LowFat:"Yes",Orgainc:"No"});
   [Bindable]
   private var targetGridDP:ArrayCollection = new ArrayCollection();
  ]]>
 </mx:Script>
 <mx:DataGrid id="myDataGrid" dataProvider="{_Array}" dragEnabled="true" dropEnabled="true"/>
 <mx:DataGrid id="targetGrid"
    dataProvider="{targetGridDP}"
    dropEnabled="true">
    <mx:columns>
       <mx:DataGridColumn dataField="Product"
         headerText="Product"/>
       <mx:DataGridColumn dataField="Price"
         headerText="Category"/>
    </mx:columns>
 </mx:DataGrid>
</mx:Application>
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: