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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Show delete alert confirmation when selecting delete option from context menu

Thread ID:





143642 Mar 29,2019 02:57 PM UTC Apr 2,2019 11:50 AM UTC ASP.NET Core - EJ 2 3
Tags: Scheduler
Gregory Perozzo
Asked On March 29, 2019 02:57 PM UTC


I need to show delete alert confirmation when selecting 'delete appointment' from the context menu.

Today, when I select the delete option, the appointment is deleted without any confirmation.

This is the context menu code:

        function onMenuItemSelect(args) {
            var scheduleObj = document.querySelector(".e-schedule").ej2_instances[0];
            var selectedMenuItem = args.item.id;
            var eventObj;

            if (selectedTarget.classList.contains('e-appointment')) {
                eventObj = scheduleObj.getEventDetails(selectedTarget);

            switch (selectedMenuItem) {
                case 'Today':
                    scheduleObj.selectedDate = new Date();
                case 'Add':
                    var selectedCells = scheduleObj.getSelectedElements();
                    var activeCellsData = scheduleObj.getCellDetails(selectedCells.length > 0 ? selectedCells : selectedTarget);
                    if (selectedMenuItem === 'Add') {
                        scheduleObj.openEditor(activeCellsData, 'Add');
                    } else {
                        scheduleObj.openEditor(activeCellsData, 'Add', null, 1);
                case 'Save':
                    scheduleObj.openEditor(eventObj, selectedMenuItem);
                case 'Delete':

When I select the delete option within edit dialog it shows the confirmation:

How can I do that?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On April 1, 2019 10:15 AM UTC

Hi Gregory, 
Greeting from Syncfusion. 
We have prepared the below sample to display the alert while deleting the event, kindly use the below code example. 
case 'Delete':
         scheduleObj.activeEventData.event = eventObj;

Gregory Perozzo
Replied On April 1, 2019 11:10 AM UTC

Hello Karthigeyan, how are you?

Your code sample worked perfectly!

Thank you very much.

Can you help me in my other question thread about CRUD operations in the scheduler?

Thank you!

Karthigeyan Krishnamurthi [Syncfusion]
Replied On April 2, 2019 11:50 AM UTC

Hi Gregory,  
Most welcome 😊 
We will check 143650 and provide the details in that forum as soon as possible. Kindly have a follow-up it for further details. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon