Background color
To define the background color for a grid or part of a grid, place the following statements at the appropriate place in the grid specification:
<bgColor>
<colorFormat>type</colorFormat>
<color>color_ref</color>
</bgColor>
where
▪type defines how the color will be specified, and is either string if the color will be entered as a text, or numeric if the color will be entered as a hexadecimal value.
▪color_ref is the name or hexadecimal value of the color to be used.
For example, a grid specification that contains only the following formatting statements produces a standard grid on a pale yellow background:
<bgColor>
<colorFormat>numeric</colorFormat>
<color>#FFFFCC</color>
</bgColor>
You can change the background color of certain cells in the grid by placing <bgColor> within the tags that define those cells. For example, you can use different colors for alternating rows or columns, or for the heading row or column. The following specification creates a grid with green column heading cells and pale yellow cells elsewhere:
<allCells>
<bgColor>
<colorFormat>numeric</colorFormat>
<color>#FFFFCC</color>
</bgColor>
</allCells>
<headRow>
<headerCell>
<bgColor>
<colorFormat>numeric</colorFormat>
<color>#32CD32</color>
</bgColor>
</headerCell>
</headRow>
The grid displays as follows:
See also