Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top