Column Groups Expanded Collapsed Behaviour

Summary

  • Column Groups in AdapTable can be configured to open as Expanded or Collapsed
  • Users are able to set exceptions to the default for certain Column Groups

Developers can configure, when a Layout loads, the collapsed / expanded behaviour for Column Groups.

This is done on a per-Layout basis using the ColumnGroupValues property in the Base Layout object.

Note

Something very similar can be done for Row Groups using the (almost identical) RowGroupValues property

Deep Dive

Understanding the ColumnGroupValues object

There are 4 posible use cases:

Use CaseDefault BehaviourProvide Exceptions
All Groups are exandedalways-expanded
All Groups are collapsedalways-collapsed
All Groups are expanded, but exceptions listedexpanded
All Groups are collapsed, but exceptions listedcollapsed
Column Groups: Expanded and Collapsed
Fork
  • This example illustrates the different options for Expanding / Collapsing Column Groups. We provide 3 Column Groups:
    • Github - which shows Github Starts when expanded and Github Watchers when closed
    • Issues & PRs - which shows the 2 Issues columns when expanded and the 2 PRs columns when closed
    • Dates - which shows Created when expanded and Updated and Pushed when closed
  • We also provide 4 Table Layouts which demonstrate the different options:
    • Always Expanded - has ColumnGroupDefaultBehavior set to always-expanded
    • Always Collapsed - has ColumnGroupDefaultBehavior set to always-collapsed
    • Collapsed Exceptions - all Column Groups collapsed with exception of Issues & PRs
    • Expanded Exceptions - all Column Groups expanded with exception of Issues & PRs

Pivot Layouts

The same behaviour is also available for the Pivot Column Groups which are displayed in Pivot Layouts.

Find Out More

See Pivot Layout: Pivot Column Groups for more detailed information and a demo (similar to the one above)