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. Image for the cookie policy date
close icon

Wizard control nextpage button

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

1 Reply

JJ Jisha Joy Syncfusion Team October 24, 2007 12:34 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon