Hi, I have used printDataGrid for printing my data. I have applied css style for the printDataGrid. css style applied for this printDataGrid is given below.
headerColors: #D8DCDD, #F1F2F2;
alternatingItemColors: #D2D3D4, #F1F2F2;
Use of mx:PrintDataGrid in my application:
<mx:PrintDataGrid id="ddDataGrid" width="99%" height="100%" styleName="printing" sizeToPage="true"/>
But in the print document not able get alternatingItemColors for the printed datagrid.
From the documentation for PrintDataGrid
The PrintDataGrid control is a DataGrid subclass that is styled to show a table with line borders and is optimized for printing. It can automatically size to properly fit its container, and removes any partially displayed rows.
<mx:PrintDataGrid>tag inherits the tag attributes of its superclass; however, you do not use the properties, styles, events, and effects (or methods) associated with user interaction.
You might have to look into converting the data to a PDF for printing in order to get the styles you are looking for.