The "Next" button that is disabled was automatically getting Enabled when we traverse between pages

Wizard for Windows Forms Forum

Posted 12 years ago by Jagadeesh K
Version: 12.1.0302
Platform: .NET 3.5
Environment: Windows XP (32-bit)
Avatar

Hi,

I am using actipro wizard v1.0.3705. Let us say we have two wizards -"Wizard_1 & wizard_2"

On wizard_2 page load, I am disabling "Next" button using the below code.

private void wizard_2_Load(object sender, EventArgs e)
{
     Wizard.NextButtonEnabled = false;
}

For the first time, the Next button was disabled as expected.

But, If I go Back to the previous wizard (Wizard_1) and come back to Wizard_2, the Next button is getting enabled. Observed that the Load() event is not getting fired for the wizard_2 for second time. Which Event handler I need to use to achieve this?

Thanks in advance.

 

Jagadeesh

Comments (3)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jagadeesh,

Why don't you disable it from the area of code you use to show the wizard?  That way you can ensure it gets fired all the time.


Actipro Software Support

Posted 12 years ago by Jagadeesh K
Avatar

Hi,

I have also tried that as shown below. Still the button is not Disabled. Please suggest me if I am missing anything here.

I am disabling the NextButton in the Event handler of NextButtonClick of the previous wizard. (i.e.) Wizard_1. After this function, the wizard_2 is getting displayed with Next button Enabled.

private void wizard_Wizard_1_NextButtonClick(object sender, WizardPageCancelEventArgs e)
{
   Wizard.NextButtonEnabled = false;
}

Posted 12 years ago by Jagadeesh K
Avatar

I found the mistake that I am doing. 

instead of 

   private void wizard_Wizard_1_NextButtonClick(object sender, WizardPageCancelEventArgs e)
   {
       Wizard.NextButtonEnabled = false;
   }

 

I should use,

    private void wizard_Wizard_1_NextButtonClick(object sender, WizardPageCancelEventArgs e)
    {
         wizard_Wizard_1Page.NextButtonEnabled = WizardButtonEnabledDefault.False;
    }

 

Thanks for your help. 

[Modified 12 years ago]

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.