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

perform action on popup save event

I am looking for a way to perform some actions, when user closes the editor window, by clicking on the SAVE button. How do I know if the user has clicked the SAVE button, inside popupClose(e:PopupCloseEventArgs ) method? I specifically want to do this in the popup close method, as I want to access all the form data using
PopupCloseEventArgs. I know you can use onActionBegin method to know when a user clicked the SAVE or CANCEL button,
but it doesn't have any form data


e.g.
popupClose(e:PopupCloseEventArgs ){
let startElement: HTMLInputElement = e.element.querySelector('#StartTime') as HTMLInputElement;
let endElement: HTMLInputElement = e.element.querySelector('#EndTime') as HTMLInputElement;
//How can I find out if the user clicked SAVE or CANCEL?
}

3 Replies

VD Vinitha Devi Murugan Syncfusion Team November 12, 2019 06:26 AM

Hi Jose, 
 
Syncfusion Greetings. 
 
We have prepared the sample below based on your requirement. Please refer it. 
 
 
 
    onPopupClose(args: PopupOpenEventArgs): void { 
       if(args.type==='Editor'){ 
         if((this.scheduleObj.eventWindow as any).isCrudAction){ 
            alert('save click'); 
         } 
       } 
    } 
 
Regards, 
M.Vinitha devi  



JL jose lara November 13, 2019 11:08 PM

This works. thx


VD Vinitha Devi Murugan Syncfusion Team November 14, 2019 12:52 AM

Hi Jose, 
 
You are most welcome 😊 
 
Regards, 
M.Vinitha devi 


Loader.
Live Chat Icon For mobile
Up arrow icon