开发者

Anyway to change the style of datagrid?

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜