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

Confirm Delete

Thread ID:





131948 Aug 4,2017 07:49 AM Aug 9,2017 12:18 AM ASP.NET Web Forms 3
Tags: Gantt
Martin Sickel
Asked On August 4, 2017 07:49 AM

Hi I am trying to add a confirm delete box 

If i add a confirm dialog to the ActionComplete event

 if (confirm("Are you sure ? ")) { 
                        PageMethods.DeleteIt(ganttRec, onSucceeded, onFailed);
                        if (data.hasChildRecords) {

The Confirm Dialog is popping up and if I select cancel the delete is not synced to DataBase, but unfortunatly the GUI itself is updated and the Task is deleted in the view.
After reloading the page by getting the data out of the DB its fine.

How can I avoid that the view will be updated with the deleted record?

Or is there maybe a build in delete confirm Dialog?

Thanks for help

Suriyaprasanth Ravikumar [Syncfusion]
Replied On August 7, 2017 08:33 AM

Hi Martin, 
Please find the response below.  
The “ActionComplete” client side event for delete action was triggered only after the successful completion of delete operation. 
Hence the confirmation dialog was not working properly. We can achieve your requirement by using “ActionBegin” client side event. 
Please refer the following code snippet,  
<ej:Gantt ID="GanttControlResource" ActionBegin="ActionBegin" ActionComplete="ActionComplete"> 
<script type="text/javascript"> 
            function ActionBegin(args) { 
                    if (args.requestType === 'delete' && !confirm("Are you sure ? ")) 
                        args.cancel = true; 
            // To update the database through dialog editing or tool bar editing 
            function ActionComplete(args) { 
                // Sql delete operations 
We have also prepared a sample for your reference, please find the sample location as below, 
Suriyaprasanth R. 

Martin Sickel
Replied On August 8, 2017 03:36 AM

Thank you for the great Support.


Jayakumar Duraisamy [Syncfusion]
Replied On August 9, 2017 12:18 AM

Hi Martin, 
Thanks for the update. 
Jayakumar D 


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.

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.