AdvancedDataGrid渲染单元格颜色

<mx:AdvancedDataGrid width="100%" height="100%" id="alarmDg" rowCount="3"
         headerSortSeparatorSkin="mx.skins.ProgrammaticSkin"
         draggableColumns="false" sortableColumns="false" sortExpertMode="false"
         rowHeight="25" headerHeight="25" textAlign="center" dataProvider="{alarmData.children()}">
    <mx:columns>
     <mx:AdvancedDataGridColumn headerText="告警类型>
     <mx:AdvancedDataGridColumn headerText="一级" dataField="firLevel" textAlign="center">
      <mx:itemRenderer>
       <fx:Component>
        <mx:HBox  horizontalAlign="center" >
         <s:BorderContainer borderWeight="1" cornerRadius="5" backgroundColor="0xff0000" top="5" left="10" bottom="5" height="20" width="80">
          <s:Label text="{data.firLevel}"  top="2" paddingLeft="35">
          </s:Label>
         </s:BorderContainer>
        </mx:HBox>
       </fx:Component>
      </mx:itemRenderer>
     </mx:AdvancedDataGridColumn>

</mx:columns>
   </mx:AdvancedDataGrid>

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页