Wizard MoveTo() method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Craig Buchanan

    #1

    Wizard MoveTo() method

    I'm using the Wizard control in the 2.0 framework. I need to perform a
    validation on each of the steps of the wizard in the Finish button click
    event. This scenario would occur if the user clicked the Finished
    navigation link, then the Finish button, bypassing the validation that
    occurs on each page.

    In the Finish button's click event, I perform the validation of the previous
    pages. I would like to go to the first page with invalid data using the
    MoveTo() method. The code in the Finish button resembles:

    If Not UserControl.IsV alid Then
    e.Cancel = True
    Me.Wizard1.Move To(Me.Wizard1.W izardStep2)
    Exit Sub
    End If

    The MoveTo() method does move to the desired step and the ActiveStepChang ed
    event fires. Unfortunately, after the Exit Sub line, the ActiveStepChang ed
    event fires again, where the ActiveStepIndex is the Finished page. Moving
    the e.Cancel line after the MoveTo() doesn't have an effect.

    What am I missing?

    Thanks in advance.

    Craig Buchanan


Working...