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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

perform action on popup save event

Thread ID:

Created:

Updated:

Platform:

Replies:

149006 Nov 12,2019 12:33 AM UTC Nov 14,2019 05:52 AM UTC Angular - EJ 2 3
loading
Tags: Schedule
jose lara
Asked On November 12, 2019 12:33 AM UTC

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?
}

Vinitha Devi Murugan [Syncfusion]
Replied On 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  


jose lara
Replied On November 14, 2019 04:08 AM UTC

This works. thx

Vinitha Devi Murugan [Syncfusion]
Replied On November 14, 2019 05:52 AM UTC

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


CONFIRMATION

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