Context Menu

Summary

  • The Context Menu provided by AG Grid (when you right-click in a Cell) is extended by AdapTable
  • As a result 3 sets of Menu Items can appear in the Context Menu:
    • Provided by AG Grid
    • Shipped by AdapTable
    • Supplied by Developers
  • Developers have full control over the content and order of these sections

The AG Grid Context Menu is accessed by right-clicking any cell in the Grid.

Caution

The Menu only displays if the MenuModule (or AllEnterpriseModules) is provided to AG Grid

AdapTable Menu Items

AdapTable provides a large number of useful Menu Items (see the full list here) .

These are appended to AG Grid's own Context Menu.

Note

The Menu Items displayed will vary depending on the cell clicked and which other cells are selected

Each Menu Item contains 2 properties which allow developers to reference it, enabling full control over each Menu Item's visibility and position:

AG Grid Menu Items

AdapTable makes 2 changes to the default context menu items which are provided by AG Grid:

  • it groups the Copy / Paste related items into a "Copy and Paste" menu item (with 5 sub menu items)
  • it hides the Export Menu Item (as this is provided in a fuller form by AdapTable's export menu items)

Hint

AdapTable also allows developers to change AG Grid's menu items (this can also be done directly in AG Grid)

Configuring the Context Menu

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

This is done via the customContextMenu property in Context 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 Context Menu and Adding Custom Context Menu Items for full details of these topics

FAQ

I cannot access the AG Grid Context Menu on my laptop? If you are using a trackpad and are unable to access the AG Grid context menu, set allowContextMenuWithControlKey to true in GridOptions.

Can I remove AG Grid menu items? Yes - via AG Grid or AdapTable depending whether you want to remove some or all of AG Grid's Menu Items:

  • to remove some AG Grid menu items (e.g. Copy) use the GetContextMenuItems property in AG Grid Grid Options
  • to remove all the AG Grid menu items use the customContextMenu property in Context Menu Options

Can I hide some Menu Options that I do not require? Yes, the customContextMenu property in Context Menu Options allows you to define which AdapTable Context Menu Items should be displayed

Why do I not see all the Menu Options listed in the table above? There are 2 possibilities:

  • check you are not using customContextMenu property in Context Menu Options to hide some menu items
  • check which Entitlements are currently applied - AdapTable does not show menu items for Hidden Entitlements