flex中如何使DataGrid中的表头居中,下面的记录右对齐?

来源:百度知道 编辑:UC知道 时间:2024/07/04 12:31:36

1.先写个css
<fx:Style>
.gridCenter { text-align: center; }
</fx:Style>
2.然后在设置表头样式
<mx:DataGridColumn headerText="编号" dataField="ID" textAlign="right" headerStyleName="gridCenter"/>