Column Menu

View as Markdown

Summary

  • AdapTable extends AG Grid's column header menu — AG Grid still owns the menu chrome; AdapTable adds module items via columnMenuOptions.customColumnMenu
  • The Menu provided by AG Grid in each Column Header is extended by AdapTable
  • As a result 3 sets of Menu Items can appear in the Column Menu:
    • Provided by AG Grid
    • Shipped by AdapTable
    • Supplied by Developers
  • Developers have full control over the content and order of these sections

AG Grid provides a Column Menu which appears in each Column Header.

AdapTable supports and extends this Column Menu in various ways.

Note

  • The AG Grid Column Menu is typically accessed by clicking the 3 horizontal dots in each Column Header
  • The Menu only displays if the MenuModule (or AllEnterpriseModules) is provided to AG Grid

Topics in this Section

TopicSummary
This pageAG Grid + AdapTable items, entitlements, design-time control
Column Menu Default StructureDefault groups, item names, and when each entry appears
Configuring the Column MenuReorder, restructure, remove with customColumnMenu
Custom Column Menu ItemsUserColumnMenuItem and framework menu rows
Column Menu Technical ReferencecolumnMenuOptions, context types, columnMenuApi
Context MenuSame callback pattern for right-click menus

AdapTable Menu Items

AdapTable provides a large number of Menu Entries which it inserts into the AG Grid Column Menu (see the full default structure).

The Menu Items which are available in each Column vary depending on the column's data type and the current AdapTable State.

Note

Most Menu Items are column-specific, but some relate to the Grid as a whole

Each Menu Entry is associated with a different Module to give Developers control over its visibility.

Developers are able to specify which (if any) AdapTable menu items appear.

AG Grid Menu Items

AdapTable supports the AG Grid Column Menu and all the AG Grid provided items are still available.

Hint

Unlike with the Context Menu, AdapTable doesn't make any changes to the AG Grid menu items

Configuring the Column Menu

The Column Menu can be configured at design-time to meet users' requirements.

This is done via the customColumnMenu property in Column Menu Options, which can be used to arrange the Column Menu in multiple ways:

  • reorder Menu Items
  • restructure Menu Items
  • remove Menu Items
  • add Custom Menu Items

Find Out More

See Configuring the Column Menu and Adding Custom Column Menu Items for full details of these topics

FAQ

How does AdapTable relate to AG Grid here? AG Grid renders the column menu. AdapTable supplies extra items and lets you reshape the combined menu in customColumnMenu. Use defaultAdaptableMenuStructure / defaultAgGridMenuStructure for the default trees, or defaultAdaptableMenuItems / defaultAgGridMenuItems for flat lists.

How do I hide or reorder AdapTable items? Implement customColumnMenu — filter by name, reorder arrays, or rebuild groups. Item ids are listed on Column Menu Default Structure.

Can I add my own menu entries? Yes — return UserColumnMenuItem entries from the same callback, or see Custom Column Menu Items.

Why are some items missing? Check customColumnMenu, column type / layout conditions on the default structure page, and Entitlements (Hidden modules do not contribute items).

Is there a way to make the 3 vertical dots for the menu always visible in the Column Header? Yes, via AG Grid — set suppressMenuHide to true in GridOptions.