Category / Section
How to customize Context Menu in Gantt?
1 min read
Context Menu can be customized by adding an additional menu item, using the contextMenuOpen client-side event. This event is triggered when the context menu is opened by mouse action. The following example code is for inserting a custom menu item in Context Menu.
JS
$(function () { $("#gantt").ejGantt({ dataSource: data, //... //... contextMenuOpen:ContextMenuOpen, }); }); function ContextMenuOpen(args) { args.contextMenuItems.push({ headerText:"CollapseAll", iconPath: "url(../themes/collapseAll.png)", eventHandler:"" }); }