TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
priya Avanigadda
NA
45
8.2k
How to implement a Context Menu when click on table cell?
Jul 3 2018 7:51 AM
Hi,
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) {
pivotData.forEachMatchingRecord(filters,
function (record) { names.push(record.Name); });
alert(names.join("\n"));
}
}
}
}
});
});
});
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
Attachment:
PivotTable.zip
Reply
Answers (
0
)
DataTable Selected Row Checkbox Ids Not Working Properly
Onchange: Select options onchange