Wizard implementation

3 posts, 0 answers
  1. Paul
    Paul avatar
    31 posts
    Member since:
    Mar 2011

    Posted 07 Oct 2015 Link to this post

    I  have a few questions on implementation. I haven't figured out approach yet. Basically, the scenario is that this is on a admin site, and that certain steps would load pending upon the roles the user has.

    If I had the steps written explicitly and then have the removed from the server side, the fields in the removed steps would still technically be available on the on finish event, just not editable by the user, ​correct?

    If I were to put them in user controls and add them dynamically from the codebehind, then with each one I would have to use a save button and use event bubbling described here: http://www.telerik.com/forums/refresh-wizard-from-usercontrol , correct?

    If I had only one step on, it would determine that is the final step and hide the previous button, correct?

  2. MBEN
    MBEN avatar
    203 posts
    Member since:
    Nov 2011

    Posted 19 Oct 2015 in reply to Paul Link to this post

    Is it possible to remove the previous button on Finish Step?
  3. Ivan Danchev
    Ivan Danchev avatar
    1721 posts

    Posted 22 Oct 2015 Link to this post


    I am afraid that if you remove a step it won't be available in the FinishButtonClick event handler, neither will be any of its content.
    The event bubbling from the linked thread is a way to access the RadWizard's steps from a UserControl embedded in a step. If you want to add new steps and remove steps you don't necessarily have to use UserControls. This can be done conditionally (based on user role for instance) in the main page's code-behind as demonstrated in the Add / Remove WizardSteps demo.
    As for the presence of the "Remove" button, it will appear depending on the step's StepType property value. It won't be present if the type is "Start" but will appear if the type is "Step" or "Finish" even if the Wizard contains only one step. If you want to hide it you can do so on the client in the Wizard's OnClientLoad client-side event handler for instance, where you can check the step type and if it is "Finish" hide the button. Here's how this can be done:
    function OnClientLoad(sender) {
        var activeStep = sender.get_activeWizardStep();
        if (activeStep.get_stepType() == "2") {
    A value "2" returned by the get_stepType() method corresponds to a step of type "Finish". If the step is of this type you can get the button by its class with jQuery and hide it.

    Ivan Danchev
Back to Top