views:

233

answers:

3

Hello 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.

+1  A: 

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.

www.Flextras.com
Nice. Thanks for the answer. I like your website as well..+1...:D
Jerry
Thanks! ;) You can download free developer editions of all our components if you want to try them out.
www.Flextras.com
+1  A: 

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.

Dean Johnston
Thanks. I forget about it. Very nice recommendation +1 :D
Jerry
A: 

.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;

}

estherf