Styling Column Headers

View as Markdown

Summary

  • It is possible to style and format Column Headers
  • Headers use a Style and an optional string Display Format — they cannot use a Condition

Format Column Styles and Display Formats can also be applied to Column Headers.

Caution

You cannot apply a Condition to Column Headers (there is only one header value and nothing to evaluate)

This is done through the Target property of the FormatColumn object which can be either:

  • cell (the default) - applies the Format just to the Column's data cells
  • columnHeader - applies the Format only to the Column Header

Note

  • All Column Headers always only use a String Display Format (as the Column Header value is a string)
  • This applies also to Numeric and Date columns (whose cells use Number and Date Display Formats respectively)
Styling & Formatting Column Headers
Fork
  • This example contains 3 Format Column Styles which have been applied to Column Headers only:
    • All Columns are centre-aligned
    • Language Column is blue, capitalised and italicised
    • Numeric Columns have a distinctive background
Loading demo…