The Doc. Composer template allow users to customize how the model data being generated into documents. User can freely control how the rendering of model data by writing XML template. In this article we will demonstrate how to control the background color of table rows when writing XML templates.
Control the background color of particular row
In each TableRow you can define its background color with the backgroundColor property. The value should be defined in Hex color code.
Having the table rows show in alternate colors
Besides specify the background color row by row, you can also specify the row background color directly on TableBlock. By specify multiple colors they will show in alternate rows according to the order you defined.
<TableBlock rowBackgroundColors="#D0CECE, #FFFFFF">
* Please note that the color defined in TableRow will override the alternate color defined in TableBlock.