experiment_id: web-retrieval-v1
fixture_id: /docs/features/context-menu
mode: provenance
representation: html
origin_response_id: 7860a528645d1442b6a26ec7b3277899
version: 2026-10-22
version_created_at_utc: 2026-10-22T19:49:39.603Z
version_nonce: 6895c5cd7619979c84a4c723e77b7d0a
generated_at_utc: 2026-10-31T00:31:41.631Z
response_nonce: 8b51057504e4726fc44cb341e13a923b
Docs Version 1

Context Menu

ZingGrid has a default context menu that allows you to insert rows, edit your grid, and more!

Default Menu

Simply enable a context menu by adding the context-menu attribute to your <zing-grid> element (see below). By default, the context menu only opens when you right-click on a cell.

<zing-grid context-menu></zing-grid>

Context Menu Enabled Grid:

Here is a complete grid with a right-click context menu to edit the grid as necessary:

Top

Static Menu

You can easily add a static context menu to your grid by adding the static-menu attribute instead (see below). By default, the static context menu displays in the upper right hand corner of the grid.

<zing-grid context-menu static-menu></zing-grid>

Static Context Menu Grid

Here is a complete grid with a static context menu button:

Top

Column Menu

Easily add a column toggle menu to choose which columns to display or hide by adding the columns-control attribute (see below). By default, it will appear in the upper right hand corner of your grid.

<zing-grid columns-control></zing-grid>

Column Toggle Menu

Here is a complete grid with a column toggle menu button:

Top

Custom Menu

You can also make your own context menu by using the <zg-menu> tag and setting the context-menu attribute of the grid to the id of your menu, like so:

<zing-grid context-menu="mymenu">
  <zg-menu id="mymenu">
    <img src="..." alt="Chargers Logo">
  </zg-menu>
</zing-grid>

Custom Context Menu Grid

Here is a complete grid with a context menu displaying custom text, images, and links:

Top

Related Resources

Here are some extra resources related to this feature to help with creating your grid:

[features: context menu]