Joar
asked on
Removing wizardsteps in vb.net gives the error "Argument out of rabge exception"
I have 6 wizardsteps, represented as 6 buttons in the SideBar (not using Next and Previous buttons)
For some records in the db I do not need wizardstep 5 an 6
If I click on wizardstep 5 or 6 and then move to a record which doesn't need step 5 and 6, I do:
wizardStep.RemoveAt(6)
wizardStep.RemoveAt(5)
This gives the crash error "Argument out of range exception".
If I move to wizardstep 4, before moving on to changing record, things goes well
I hav tried all ways of workarounds I feel, with no success
For some records in the db I do not need wizardstep 5 an 6
If I click on wizardstep 5 or 6 and then move to a record which doesn't need step 5 and 6, I do:
wizardStep.RemoveAt(6)
wizardStep.RemoveAt(5)
This gives the crash error "Argument out of range exception".
If I move to wizardstep 4, before moving on to changing record, things goes well
I hav tried all ways of workarounds I feel, with no success
ASKER
No, I want to remove the steps, because they are meaningless for some records.
I know about the zero based step index, so in the example above I ment to remove steps 4 and 5...
May be I should use another technique than wizardsteps, for example multiview??
The only thning I want is having some buttons in the left margin.
Clicking on different buttons, I want to display different windows in the right part of the page.
I know about the zero based step index, so in the example above I ment to remove steps 4 and 5...
May be I should use another technique than wizardsteps, for example multiview??
The only thning I want is having some buttons in the left margin.
Clicking on different buttons, I want to display different windows in the right part of the page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In any case, I think the wizard steps are indexed with a base zero index. So index 6 might not exist - use indices 0 - 5. You can check this by calling IndexOf on the wizard steps you are interested in skipping.
If I'm not helping here, please post some code.