I am trying to change the header color and the row color of the datagrid. Apparently, its not a spark component so can't apply skin on it. Anyone knows how to style开发者_运维问答 it? Thanks.
http://docs.huihoo.com/flex/4/mx/controls/DataGrid.html#styleSummary
headerBackgroundSkin headerColors headerDragProxyStyleName headerSeparatorSkin headerStyleName
I'm pretty sure the header is a button, so by using the headerStyleName you should be able to specify any button style.
http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html
I am fairly new to flex and have found that flex style explorer is really useful for figuring out which properties to change. DataGrid is one of the components it supports.
.datagridHeader
{
color:#365e78;
font-size:12;
font-family:Arial,"_sans";
font-weight:bold;
}
mx|DataGrid
{
alternating-item-colors: #FFFFFF, #FFFFFF;/*keep background completely white*/
header-style-name:"datagridHeader";
/*header-background-skin:ClassReference("skin.header_btn");*/
chrome-color:#41b2ff;
}
精彩评论