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
close icon

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 11:26 AM UTC

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 14, 2019 04:08 AM UTC

This works. thx


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

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


Loader.
Live Chat Icon For mobile
Up arrow icon