Articles in this section
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:"" 
});
     }

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied