This is a migrated thread and some comments may be shown as answers.

Dialog-close-notification

3 Answers 386 Views
Window
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 1
Anna asked on 19 Jul 2017, 08:38 PM

Hi team,

I'm wondering if there is a way to pop-up a notification dialog on Kendo Window closing to warn user about unsaved changes, and allow them to choose between continue closing anyway and undo the closing command so they can save their change? Just like the Page Close Notification dialog?

 

Best,

 

Anna

3 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 21 Jul 2017, 12:39 PM
Hi Anna,

Here's a dojo example, which shows how you can use the widget's API to display a Dialog that asks the user to confirm closing the Window. Closing the Window is initially prevented in the Dialog's show event handler. If the user then confirms the Window is closed by calling its close method in the Dialog's Yes action handler.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Anna
Top achievements
Rank 1
answered on 21 Jul 2017, 05:54 PM

Hi Ivan,

Thank you for getting back to me. I'm using AngularJs version of Kendo UI. Can you explain a bit why select "Cancel" of the Kendo dialog will stop the main Window from closing? 

I mean look at the dojo you give above, the solution seems to be invoke a Kendo Dialog on close event. If I don't use Kendo Dialog, can I substitute it with other mechanism? 

 

Thanks,

 

Anna

0
Anna
Top achievements
Rank 1
answered on 21 Jul 2017, 08:57 PM
Nevermind. I see now. It's the e.preventDefault() that did the magic.
Tags
Window
Asked by
Anna
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Anna
Top achievements
Rank 1
Share this question
or