Styling Column Headers
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 cellscolumnHeader- 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
- This example contains 3 Format Column Styles which have been applied to Column Headers only:
AllColumns are centre-alignedLanguageColumn is blue, capitalised and italicisedNumericColumns have a distinctive background
Loading demo…