1
如何在数据网格的列中放置两个不同的文本(使用html标签),其中一个文本将右对齐,另一个将左对齐。数据网格中的文本对齐
如何在数据网格的列中放置两个不同的文本(使用html标签),其中一个文本将右对齐,另一个将左对齐。数据网格中的文本对齐
为相关列创建自定义itemRenderer。这里是关于itemRenderers的文章。
要随着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>