2011-06-10 98 views

回答

0

要随着Flextras答案走,这里有一个简单的例子:

<mx:DataGrid dataProvider="{myArrayCollection}"> 
    <mx:columns> 
     <mx:DataGridColumn headerText="Title" dataField="title"> 
      <mx:itemRenderer> 
       <mx:Component> 
        <mx:VBox paddingLeft="2" width="100%"> 
         <mx:Label text="{myDataField1}" width="100%" /> 
         <mx:Label text="{myDataField2}" textAlign="right" width="100%" /> 
        </mx:VBox> 
       </mx:Component> 
      </mx:itemRenderer> 
     </mx:DataGridColumn> 
    </mx:columns> 
</mx:DataGrid>