Control Background Color of Table Rows in Doc. Composer

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.

<TableRow backgroundColor="#84A8EB">

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">

Table with alternate colors in rows

* Please note that the color defined in TableRow will override the alternate  color defined in TableBlock.

Related Know-how

Related Link

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply