Merging formats and styles in the data grid

You can apply multiple formats and styles to the same data grid elements. In such cases rules of merging and overwriting format characteristics are applied.

A data grid element can be influenced by several formats and styles. Each data grid element has its own place in the specificity hierarchy. Specificity in the data grid determines the ordering of formats and styles to be applied to a specific data grid element.

The specificity hierarchy of the data grid has these levels, from the most general to the most specific:

  • The entire report.
  • All elements in all row headers and all value cells.
  • A column with value cells.
  • A row with value cells.
  • A row header element and a row value cells.
  • A value cell.

Formats and styles can overlap in the same element. In such cases the format of the highest element in the specificity hierarchy is prioritized. For example, you apply one style, such as a bold font and red font color, to a column with value cells. You also apply another style, such as a blue font color and all borders, to a row with value cells. The value cell in which the column and row overlap will have a merged style, with a bold font, blue font color, and all borders. The all borders format characteristic is added and the font color is overwritten, as these are characteristics of the element that is higher in the specificity hierarchy.