This is a migrated thread and some comments may be shown as answers.

ActiveStepChanged event and step validation

2 Answers 86 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 09 Sep 2019, 08:36 AM

Normally the Wizardstep is only validating when stepping forward.

 

When I use the OnActiveStepChanged event the Wizard validates also validates on stepping backwards.

Can this be prevented?  Is this a bug or by design?

 

Marc

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 12 Sep 2019, 10:29 AM

Hello Marc,

The back button is triggering the postback but the validators are preventing the change on the server-side. 

To overcome this, you can set the ActiveStepIndex manually in the PreviousButtonClick server-side event:

protected void RadWizard1_PreviousButtonClick(object sender, WizardEventArgs e)
{
    if (e.CurrentStepIndex == e.NextStepIndex )
    {
        RadWizard1.ActiveStepIndex = e.CurrentStepIndex-1;
    }
}

Regards,
Peter Milchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 12 Sep 2019, 11:01 AM

Hi Peter,

 

Thanks this does the trick.

For what it's worth, this also goes for the NavigationBarButtonClick event.

 

Marc

Tags
Wizard
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Peter Milchev
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or