priya Avanigadda

priya Avanigadda

  • 1.9k
  • 45
  • 3.1k

How to implement a Context Menu when click on table cell?

Jul 3 2018 7:51 AM
I have pivot table and I need to display the context menu when I click on pivot table cell(the table created dynamically) can any one help me how to write the code to achieve this?
I wrote a sample code to generate a alert when I click on table cell, the below is code sample
$(function () {
$.getJSON("http://localhost:56453/Scripts/mps.json", function (mps) {
$("#output").pivotUI(mps, {
rows: ["Nationality"],
cols: ["Stage","Language"],
aggregatorName: "Count",
vals: ["Age"],
rendererName: "Heatmap",
rendererOptions: {
table: {
clickCallback: function (e, value, filters, pivotData) {
var names = [];
if (value != null) {
function (record) { names.push(record.Name); });
Instead of alert I need to generate the context menu , can any one help me how to do this??
Am sharing the image ,for clear info ,kindly check the attached image


Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.