WarUI

Customizing Header Menu Items

GRID-A22-F02P0baselinePlanned

Developers can remove, reorder, or replace built-in header menu items and add custom items with their own actions, either per column or for the whole grid. Every application has domain-specific column actions, so the menu has to be extensible without forking the grid.

Planned. This page shows the specification from issue #202. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A product grid where numeric columns show two extra custom items under a separator.

Expected behavior

The header menu content updates live as the controls change. Choosing 'Copy column values' copies the visible values to the clipboard and shows a toast. The callback receives the column definition and the current column state.

Planned API surface

gridOptions.getHeaderMenuItems(params)columnDefs[].headerMenuItemsMenuItemDef{id,label,icon,action,disabled,hidden,shortcut,subMenu}builtInMenuItemIdsonHeaderMenuItemSelect

Acceptance criteria

  • getHeaderMenuItems receives the column, the column state, and the default item list. (pending)
  • Returning an array of built-in IDs and MenuItemDef objects renders those items in that exact order. (pending)
  • A columnDefs[].headerMenuItems override takes precedence over the grid-level callback. (pending)
  • A custom action receives params containing the grid API and the column. (pending)
  • An unknown built-in ID logs a development warning and is skipped. (pending)