experiment_id: web-retrieval-v1
fixture_id: /demos/web-component-grid-context-menu
mode: provenance
representation: html
origin_response_id: 5375d501a5867657df56befbce91bba9
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.561Z
version_nonce: 7fdb196135545e6b513cc683aa59870d
generated_at_utc: 2026-10-25T06:43:08.915Z
response_nonce: 5ba26d1315dd9e34d0edea9abe6eebd4

Context Menu

122 of 125
Easily add a context menu with the context-menu attribute. Then, just right-click on a cell to see it!
Result Full HTML CSS JS
Edit Download

Full Code

<!DOCTYPE html>
<html class="zg-html">

<head>
  <meta charset="utf-8">
  <title>ZingGrid Demo</title>
  <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
  <style>
    zing-grid[loading] {
      height: 613px;
    }
  </style>
</head>

<body class="zg-body">
  <zing-grid caption="Class Syllabus" context-menu editor sort>
    <zg-colgroup>
      <zg-column index="week" header="Week"></zg-column>
      <zg-column index="topic" header="Topic"></zg-column>
      <zg-column index="reading" header="Reading Assignment"></zg-column>
    </zg-colgroup>
    <zg-data data='[
		    {"week": 1, "topic": "Needfinding", "reading": "1.1-1.5"},
		    {"week": 2, "topic": "Prototyping", "reading": "2.1-2.4, 3.1"},
		    {"week": 3, "topic": "Heuristic Evaluation", "reading": "4.2, 4.5"},
		    {"week": 4, "topic": "Mental Models", "reading": "none"},
		    {"week": 5, "topic": "Advanced Front-end Web Development", "reading": "5.1-5.6"},
		    {"week": 6, "topic": "Visual Design", "reading": "none"},
		    {"week": 7, "topic": "Runnning Experiments", "reading": "6.1, 6.3"},
		    {"week": 8, "topic": "Information Foraging", "reading": "7.5-7.7"},
		    {"week": 9, "topic": "Analytics and A/B Testing", "reading": "8.1-8.4"},
		    {"week": 10, "topic": "Final Presentations", "reading": "none"}]'>
    </zg-data>
  </zing-grid>
  <script>
    ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
  </script>
</body>

</html>
<!DOCTYPE html>
<html class="zg-html">
	<head>
    <meta charset="utf-8">
    <title>ZingGrid Demo</title>
		<script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
	</head>
	<body class="zg-body">
		<zing-grid 
      caption="Class Syllabus"
      context-menu         
      editor
      sort>
		  <zg-colgroup>
		    <zg-column index="week" header="Week"></zg-column>
		    <zg-column index="topic" header="Topic"></zg-column>
		    <zg-column index="reading" header="Reading Assignment"></zg-column>
		  </zg-colgroup>
		  <zg-data data='[
		    {"week": 1, "topic": "Needfinding", "reading": "1.1-1.5"},
		    {"week": 2, "topic": "Prototyping", "reading": "2.1-2.4, 3.1"},
		    {"week": 3, "topic": "Heuristic Evaluation", "reading": "4.2, 4.5"},
		    {"week": 4, "topic": "Mental Models", "reading": "none"},
		    {"week": 5, "topic": "Advanced Front-end Web Development", "reading": "5.1-5.6"},
		    {"week": 6, "topic": "Visual Design", "reading": "none"},
		    {"week": 7, "topic": "Runnning Experiments", "reading": "6.1, 6.3"},
		    {"week": 8, "topic": "Information Foraging", "reading": "7.5-7.7"},
		    {"week": 9, "topic": "Analytics and A/B Testing", "reading": "8.1-8.4"},
		    {"week": 10, "topic": "Final Presentations", "reading": "none"}]'>
      </zg-data>
		</zing-grid>
	</body>
</html>
/* No CSS styles */
// No JS code

Interested in this demo? Modify it to your needs in ZingSoft Studio, our testing sandbox. It's free to sign up, and you can come back and edit at any time!

Edit in Studio

Demo Gallery