Finding Wizard Steps/Accessing buttons

6 posts, 0 answers
  1. Albert Shenker
    Albert Shenker avatar
    551 posts
    Member since:
    Mar 2004

    Posted 25 Dec 2015 Link to this post

    Wizard Steps should have a "Value" or other similar property so that they can be located server and client side by something other than title and/or index using a FindByValue method. Wizard Step titles and indices can be easily changed as the Wizard is modified, thus breaking any code that makes use of title or indices to get a reference to a step.

    Also, and it has been repeated elsewhere, users need to be able to access the Wizard navigation buttons server-side in order to manipulate them (text, enabled/disabled, visibility, etc.). I'm not really sure why such basic functionality wasn't part of the initial release of the control. I mean, why would you release a control that provides a number of features which improve on the existing ASP.NET Wizard control, and yet is missing a bunch of important features that the ASP.NET Wizard control has. It just puts developers in a bind, having to decide whether or not to invest the time and energy of figuring out how to implement your control, only to find that they can't do some basic thing after investing that time.

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 25 Dec 2015 Link to this post

    Hi Albert,

    You can work with the Steps as access them by ID. For example:
    <telerik:RadWizard runat="server" ID="wizard">
              <WizardSteps>
                  <telerik:RadWizardStep ID="step1" Title="Step 1"></telerik:RadWizardStep>
              </WizardSteps>
          </telerik:RadWizard>

    protected void Page_Load(object sender, EventArgs e)
        {
            step1.Title = "New Title";
            step1.Enabled = false;
        }


    Regards,
    Hristo Valyavicharski
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Albert Shenker
    Albert Shenker avatar
    551 posts
    Member since:
    Mar 2004

    Posted 25 Dec 2015 in reply to Hristo Valyavicharski Link to this post

    will the findcontrol method work then in order to get a reference to the step by a string... like... CType(MyWizard.FindControl("step1"), RadWizardStep)?

     

    Also, will $get('<%= step1.ClientId%>') work to reference the step client-side?

  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 25 Dec 2015 Link to this post

    Yes the FindControl method will work. However to step reference you will have to use the control client api:
    <script type="text/javascript">
        function getStepById(id) {
            var wizard = $find("wizard");
            var steps = wizard.get_wizardSteps();
            for (var i = 0; i < steps.get_count() ; i++) {
                var step = steps.getWizardStep(i);
                if (step.get_id() == id) {
                    return step;
                }
            }
        }
    </script>


    Regards,
    Hristo Valyavicharski
    Telerik
  6. Albert Shenker
    Albert Shenker avatar
    551 posts
    Member since:
    Mar 2004

    Posted 25 Dec 2015 in reply to Hristo Valyavicharski Link to this post

    ok. By the way the step.get_id() function is not documented.

    Also, it would be useful if the wizard or wizardstepcollection objects had a findStepById method.

  7. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 25 Dec 2015 Link to this post

    Thank you for point this out. We will add this, or you can add it by yourself as you click on the Edit button:


    It is a great idea to add "findStepById" functionality. Please submit it to our Feedback Portal.

    Thank you.

    Regards,
    Hristo Valyavicharski
    Telerik
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017