ContextMenu in Gantt ResourceView

Hello,

I'm trying to create a custom context menu for my gantt, but I'm facing one trouble.
My goal is to add a custom menu to add tasks in the gantt, but it only works for the ProjectView mode. In the ResourceView mode it doesn't work.

Any idea?

Thanks

7 Replies

JS Jonesherine Stephen Syncfusion Team June 7, 2018 12:43 PM UTC

Hi Oscar, 
Using contextMenuOpen client side event we can customize the context menu in ResourceView Gantt also. 
Please find the code example below. 
$("#resourceGantt").ejGantt({ 
    //.. 
    contextMenuOpen: contextMenuOpen 
}); 
function contextMenuOpen(args) { 
    var data = args.item; 
    if (data) { 
         var contextMenuItems = [{ 
             headerText: "Top", 
             eventHandler: customMenuAddHandler, 
             menuId: "Top", 
             parentMenuId: "Add", 
             iconClass: "e-topIcon" 
          }]; 
     args.contextMenuItems.push.apply(args.contextMenuItems, contextMenuItems); 
   } 
} 
function customMenuAddHandler(args) { 
    var currentMenuId = args.menuId, 
        tempData = args.data && $.extend({}, args.data.item); 
        if (currentMenuId == "Top") 
           this.addRecord(tempData); 
} 
 
We have also prepared the sample based on this. Please find the sample from below location 
Please let us know if you require further assistance on this. 
 
Regards, 
Jone sherine P S 



OB oscar bartolome June 8, 2018 11:14 AM UTC

Thanks for the response.

Could you please provide an example in Angular? With this code in Angular works great for the ProjectView gantt, but it doesn't work for the Resources View one.

Thanks.


JS Jonesherine Stephen Syncfusion Team June 8, 2018 01:00 PM UTC

Hi Oscar, 
We have checked your query and this was an issue at our end and logged a defect report. This issue will be fixed in our upcoming volume 2, 2018 Service Pack 1 release. 
 
Please let us know if you need further assistance on this. 
Regards, 
Jone sherine P S 



OB oscar bartolome June 11, 2018 06:09 AM UTC

Hi,

when is expected the volume 2 2018 Service Pack 1 to be released?

Thanks 


PE Punniyamoorthi Elangovan Syncfusion Team June 12, 2018 01:31 PM UTC

Hi Oscar,  
Our Volume2, Service pack 1 is expected to roll out in the end of July 2018.  
Please let us know if you require further assistance on this.  
Regards,  
Punniyamoorthi 



OB oscar bartolome June 12, 2018 01:54 PM UTC

Ok, thanks. I'll wait for it. 

Please let me know when it's out


PE Punniyamoorthi Elangovan Syncfusion Team June 13, 2018 12:39 PM UTC

Hi Oscar, 
Thank you for your update 
We will let you know once our Volume 2 Service pack 1 is rolled out 
Regards, 
Punniyamoorthi 


Loader.
Up arrow icon