Formatting Column Groups

Summary

  • Columns in Column Groups can be formatted depending on whether the Group is Expanded or Collapsed

By default all Columns placed inside Column Groups will be styled and formatted normally, and irrespective of whether the Column Group is expanded or collapsed.

However it is possible to stipulate that a Column is only formatted if the Column Group in which it is situated is expanded (or collapsed).

Hint

This is particularly useful when using Pivot Column Groups and Pivot Total Columns

This is done using the ColumnGroupScope property in the Format Column object which can take 3 values:

  • Both (the default)
  • Expanded
  • Collapsed

Caution

Both will not be applied to top-level columns which don't have a parent group

Column Groups: Expanded and Collapsed
Fork
  • In this example we have created Format Column Styles on 3 Columns inside Column Groups - each with a different behaviour (set via the ColumnGroupScope property):
    • The Issue Change column is set to Both - which is why the Style is visible when the Issues & PRs Column Group is both expanded and collapsed
    • The Github Stars column is set to Collapsed - which is why the Style is visible when the Details Column Group is collapsed (but not expanded)
    • The Github Watchers column is set to Expanded - which is why the Style is visible when the Details Column Group is expanded (but not collapses)