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.
Unfortunately, activation email could not send to your email. Please try again.

Wizard control nextpage button

Thread ID:

Created:

Updated:

Platform:

Replies:

69309 Oct 23,2007 04:00 PM Oct 24,2007 08:34 AM Windows Forms 1
loading
Tags: Tools
Ivan Gutierrez
Asked On October 23, 2007 04:00 PM

Hi,

I'm using the wizard control and I need to validate some data in a wizard page and avoid to change to the next page when the next button is clicked if the data don't match some criteria.
How can I avoid change to next page if some condition is not granted when the user click the next button?.

Thanks

Jisha Joy [Syncfusion]
Replied On October 24, 2007 08:34 AM

Hi Ivan,

Thank you for using Syncfusion Products.

This can be acheived by handling the BeforeNext event of Wizardcontrol. BeforeNext event occurs before the corresponding action happens. If canceled, further event will not occur. This event provide you more ways to validate pages.
Here is the code snippets:


private void wizardControl1_BeforeNext(object sender, CancelEventArgs e)
{
if (!this.textBox1.Text.Equals("Syncfusion"))
{
e.Cancel = true;
MessageBox.Show("ReEnter the value");
}

}

Please refer the sample in the link to illustrate this:
http://websamples.syncfusion.com/samples/Tools.Windows/F69309/main.htm

Please try this and let me know if this helps.

Regards,
Jisha

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.

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.

;