ActionScript 2.0 Components Language Reference |
|
|
|
| DataGrid component > Customizing the DataGrid component > Using styles with the DataGrid component > Setting header styles | |||
You can set header styles through headerStyle, which is a style property itself. To do this, you create an instance of CSSStyleDeclaration, set the appropriate properties on that instance for the header, and then assign the CSSStyleDeclaration to the headerStyle property, as shown in the following example.
import mx.styles.CSSStyleDeclaration;
var headerStyles = new CSSStyleDeclaration();
headerStyles.setStyle("fontStyle", "italic");
grid.setStyle("headerStyle", headerStyles);
|
|
|
|