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

Wizard question - ValidatePage

I think I would prefer to let the user navigate back to the previous page in the wizard without validation. It may be that a choice in the previous page affects something in the current page, and if he is going back, I see no harm in letting him do that. But ValidatePage fires on both next and previous being clicked. What''s a good way to handle this? By the way, I like how the wizard is designed. I think it''s convenient to have all the controls managed by a single form.

5 Replies

MJ Mano J Syncfusion Team September 6, 2005 04:05 PM UTC

Hi Jim, You could set the WizardControl''s BackButtonCausesValidation property to false to disable the Back Button validating a page. Let me know if this meets your requirements. Thanks for your interest in Syncfusion products. Regards, Mano Syncfusion, Inc.


JI Jim September 6, 2005 04:32 PM UTC

Sounds like exactly what I''m looking for, thanks. Jim > >Hi Jim, > >You could set the WizardControl''s BackButtonCausesValidation property to false to disable the Back Button validating a page. > >Let me know if this meets your requirements. Thanks for your interest in Syncfusion products. > >Regards, >Mano >Syncfusion, Inc.


JI Jim September 6, 2005 10:14 PM UTC

Say, another quick question. When the user clicks on "Next" it would be nice to set the focus to a control on the new page. Is there an easy way to do this? I know I can override Next_Click or something like that, but is there a shortcut provided by the wizard? Jim


MJ Mano J Syncfusion Team September 8, 2005 07:34 AM UTC

Hi Jim, You could use the following code to set the focus to the first control when the next button is clicked. for(int i=0; i < 4 ; i++) { this.wizardControl1.WizardPages[i].Controls[0].Focus(); } Please refer to the sample attached below and let me know if you have any questions. Note that the controls should be added to the wizardpages in the z-order. Regards, Mano Syncfusion, Inc. wizardControl_focus_8506.zip


JI Jim September 8, 2005 03:47 PM UTC

OK, thanks. I just go ahead and check the current page and set the focus using the existing control variables. This doesn''t rely on z-order and is more readable. private void wizardControl_Next(object sender, System.EventArgs e) { if (wizardControl.SelectedPage == LoginPage) UserNameTxtBox.Focus(); else if (wizardControl.SelectedPage == WellPage) OperationsOfficeList.Focus(); } Jim

Loader.
Live Chat Icon For mobile
Up arrow icon