We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to use the menu in the schedule?

I want to display 3 schedule controls in my page, and 3 schedules have their own context menu. What should I do?

3 Replies

NR Nevitha Ravi Syncfusion Team January 18, 2019 07:18 AM UTC

Hi Pomelobutter, 

Thank you for contacting Syncfusion Support. 

We have prepared a sample by integrating context menu within our Scheduler which can be downloaded from the following link. 

In the above sample we have rendered three scheduler in a page and integrate context menu for them. 

Kindly refer the samples and let us know if you need any further assistance. 

Regards, 
Nevitha 



PO pomelobutter January 18, 2019 07:40 AM UTC

Hi, thank you for your reply, I now want to right-click on the time grid on the schedule and get all the information on this cell. Can these be obtained?


KK Karthigeyan Krishnamurthi Syncfusion Team January 21, 2019 11:45 AM UTC

Hi Pomelobutter, 
 
Thanks for your update.  
 
We have modified our previous sample to display the menu item Cell details only on cell click and by clicking that menu, cell details can be retrieved using getCellDetails function as shown below. 
 
menuItems.Add(new 
{ 
    text = "Cell details", 
    iconCss = "e-icons today", 
    id = "details" 
}); 
 
function onContextMenuBeforeOpen1(args) { 
    var newEventElement = document.querySelector('.e-new-event'); 
    if (newEventElement) { 
        ej.base.remove(newEventElement); 
        ej.base.removeClass([document.querySelector('.e-selected-cell')], 'e-selected-cell'); 
    } 
    var targetElement = args.event.target; 
    if (ej.base.closest(targetElement, 'contextmenu1')) { 
        return; 
    } 
    selectedTarget = ej.base.closest(targetElement, '.e-appointment,.e-work-cells,' + 
        '.e-vertical-view .e-date-header-wrap .e-all-day-cells,.e-vertical-view .e-date-header-wrap .e-header-cells'); 
    -------------- 
    -------------- 
} 
 
case 'details': 
    var cellDatails = scheduleObj.getCellDetails(scheduleObj.getSelectedElements().indexOf(selectedTarget) !== -1 ? scheduleObj.getSelectedElements() : selectedTarget); 
 
Regards, 
Karthigeyan 


Loader.
Live Chat Icon For mobile
Up arrow icon