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 question - ValidatePage

Thread ID:

Created:

Updated:

Platform:

Replies:

34219 Sep 6,2005 11:40 AM Sep 8,2005 11:47 AM Windows Forms 5
loading
Tags: Tools
Jim
Asked On September 6, 2005 11:40 AM

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.

Mano J [Syncfusion]
Replied On September 6, 2005 12:05 PM

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.

Jim
Replied On September 6, 2005 12:32 PM

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.

Jim
Replied On September 6, 2005 06:14 PM

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

Mano J [Syncfusion]
Replied On September 8, 2005 03:34 AM

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

Jim
Replied On September 8, 2005 11:47 AM

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

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.

;