This project has moved and is read-only. For the latest updates, please go here.

Confirmation on Cancel Button Press

Jan 6, 2012 at 11:36 AM

Hi,

Firstly, I think your control is great and it's helping me out no end with my data loading process.  However, I can't seem to find a way to get confirmation from the user if they click Cancel?  It's a bit frustrating if they've been through 5 pages of entry only to hit cancel and loose it all.

I was hoping to add a confirmation question to an Event but I can't seem to find anything that will fit the bill..  Do you have any suggestions as to what I can try?

Many Thanks

 

AndyJanes

Jan 6, 2012 at 6:06 PM

In the latest source code drop (64748) and in the future 1.2 release I have obsoleted the Cancelled event and added a replacement Cancelling event that will allow you to prompt and then optionally disable the cancellation. Thanks for the great suggestion.

Jan 6, 2012 at 6:09 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Dec 11, 2016 at 12:23 PM
Hi,

I am using version 2.1.8. I created a very simple test case, but no matter what I set in Cancelling event the Wizard closes. Did I get this behaviour wrong?
private void wizardControl1_Cancelling(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = false;
        }

private void wizardControl1_Cancelling(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = true;
        }
Jan 12 at 6:46 PM
So the way it is designed, the Cancelling event is fired when the user pressed the Cancel button. If e.Cancel is set to false, the form should not close. Is this the behavior you're seeing?
Feb 28 at 8:24 PM
No, setting e.Cancel to false does not change anything and form still closes.

dahall wrote:
So the way it is designed, the Cancelling event is fired when the user pressed the Cancel button. If e.Cancel is set to false, the form should not close. Is this the behavior you're seeing?
Mar 13 at 6:24 PM
Just to be 100% clear, which control are you using in the libary (WizardControl or WizardPageContainer)?