Checking if the user confirms deleting an event.

  onPopupOpen(argsPopupOpenEventArgs) {
    if (( args.type === 'DeleteAlert' )) {
      this.ttService.delete(id).subscribe(res=>{
        this._snackBar.open("success"'Done!', {duration: 4000});
      },err=>{
        this._snackBar.open("Error, Please try again"'Error!', {duration: 4000});
      });  
    }
  }

I need to access to the confirmation to correctly delete the appointment from database. 

3 Replies 1 reply marked as answer

PN Praveenkumar Narasimhanaidu Syncfusion Team May 20, 2021 02:21 PM UTC

Hi Zaghdoudi, 

Greetings from Syncfusion support..! 

We suspect that your requirement is “Show the confirmation message when user deleting the appointment” and prepared a sample according to your requirement using scheduler actionBegin event. Please find the sample from below link. 

App.component.ts 
 onActionBegin(argsActionEventArgs) { 
    if (args.requestType === 'eventRemove') { 
      if (args.deletedRecords.length > 0) { 
        alert('Successfully Deleted'); 
      } else { 
        alert('Error'); 
      } 
    } 
  } 

For more information related to scheduler CRUD operations in the database, Please refer following documentation link  

Kindly try the above solution and if this not comes close to your requirement, please share a detailed use case scenario about your requirement and screenshots to provide you a prompt solution at the earliest. 

Regards, 
Praveenkumar 


Marked as answer

ZB zaghdoudi baha May 20, 2021 08:54 PM UTC

Thank for your cooperation, It was successful :)


NR Nevitha Ravi Syncfusion Team May 21, 2021 04:50 AM UTC

Hi Zaghdoudi, 

You are most welcome..! please get back to us if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon