In my wizard, i want to pop up a confirmation window if the user clicks cancel button. If the user confirms (yes) then i want to cancel the wizard processing and go to my home page else continue on the same page. is it possible?
3 Answers, 1 is accepted
0
Peter Milchev
Telerik team
answered on 01 Sep 2016, 01:19 PM
Hello,
You could subscribe to the OnClientButtonClicked event and if the clicked button is Cancel, then you should show your confirmation window. Here is a sample implementation of the approach:
Can you provide the necessary JS code to cancel a wizard finish button click using the OnClientButtonClicked event?
Thanks,
Johnathan Beam
0
Peter Milchev
Telerik team
answered on 13 Dec 2016, 03:02 PM
Hello Johnathan,
To prevent the clicking event, the ButtonClicking event should be utilized and the args.set_cancel(true) method should be called. The args.get_command() method returns wizard commands corresponding to the following integers:
0 - WizardCommand.Previous;
1 - WizardCommand.Next;
2 - WizardCommand.Finish;
3 - WizardCommand.Cancel;
4 - WizardCommand.NavigationBarButtonClick;
Based on that information, the OnClientButtonClicking event handler should be similar to the following: