How to have either/or steps in a wizard

D

David Thielen

Hi;

I have a wizard where page 1 has a radio selection of Sql database or xml.
If it's sql ! want to then go to page 2 and hide page 3. If xml I want to go
to page 3 and hide page 2.

Can I do this?

Or is there a better way to do this? Like disable page 2 or 3 and it skips
it and has it greyed in the navigation pane?
 
W

Walter Wang [MSFT]

Hi Dave,

Thank you for your post.

Based on my understanding, your question is how to dynamically determine
which step to show based on user's choice. If I've misunderstood anything,
please feel free to post here.

As far as I know, the Wizard steps cannot be disabled by default.

I recommend you use a MultiView in Step 2 and create 2 View in it, one is
used to display data when the user selects Sql, another is used to display
data when the user selects Xml. And you handle the NextButtonClick event of
Wizard to check the RadioButtonList's value and set MultiView's
ActiveViewIndex accordingly:

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
if (Wizard1.ActiveStepIndex == 0)
{
if (RadioButtonList1.SelectedIndex == 0)
{
MultiView1.ActiveViewIndex = 0;
} else
{
MultiView1.ActiveViewIndex = 1;
}
}
}

Hope this helps. Please feel free to post here if anything is unclear.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Walter Wang [MSFT]

Hi Dave,

Thank you for your update.

I understand that this solution may not be the ideal one that you're after.
I've done more research later but still didn't find way to disable
individual wizard steps. If you have any concerns about this issue, please
feel free to post here.

Also, if you would like to submit a feedback to Visual Studio, you can
submit it here:

http://msdn.microsoft.com/feedback




Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Thank you for looking more. What I am doing is I have all the steps, I
disable the navigation bar, and I skip steps as needed.

Your telling me that there is no way to disable helped - because I stopped
looking for a way to do that.
 
W

Walter Wang [MSFT]

Thanks Dave for your quick update.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top