Disable steps

4 posts, 0 answers
  1. abigail
    abigail avatar
    10 posts
    Member since:
    Dec 2015

    Posted 29 Jan Link to this post

    Hi! It's possible hide or disable the back button? and disable the option too to change the step? Other dude it's possible set a time for each step? for example the step one only has 3 minutes after 3 minutes pass to the step2
  2. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 03 Feb Link to this post

    Hello abigail,
    Yes, all of the requested functionalities are feasable with the RadWizard control.

    1. Enable/hide the previous button could be easily achieved using jquery:

    Copy Code
                         //disable
                   $(".rwzButton.rwzPrevious").prop("disabled", true);
                   $(".rwzButton.rwzPrevious").css('opacity', '0.6');
     
                   //hide
                   $(".rwzButton.rwzPrevious").hide();

    2. You can prevent the user from navigating trough the wizard by canceling the OnClientButtonClicking client-side event:

    Copy Code
    function OnClientButtonClicking(sender, args) {
                if (args.get_command() == "4") // command for NavigationBar (steps).
                    args.set_cancel(true);
            }
    for other commends, refer to this article

    3. You can use the asp:Timer to navigate to the next step in the following manner:

    Copy Code
    <asp:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server" Interval="3000">
     </asp:Timer>
     
     
    protected void Timer1_Tick(object sender, EventArgs e)
       {
           int indexToSet = RadWizard1.ActiveStepIndex + 1;
           if (indexToSet <= RadWizard1.WizardSteps.Count - 1)
               RadWizard1.ActiveStepIndex = RadWizard1.ActiveStepIndex + 1;
           else
           {
               Timer1.Enabled = false;
     
           }
       }

    In addition, in the attachment you can find a simple example, of the above suggested approaches.


    Hope this would help.

    Regards,
    Nencho
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. abigail
    abigail avatar
    10 posts
    Member since:
    Dec 2015

    Posted 08 Feb in reply to Nencho Link to this post

    Sorry but I can't hide the button in wich method I set the code to hide the buttons?
  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 11 Feb Link to this post

    Hello abigail,

    The demonstrated implementation for hiding or disabling the buttons should be applicable at any time of event that you prefer to handle. For example, you can use it on pageLoad as demonstrated below:

    function pageLoad() {
                   var $ = $telerik.$;
                   $(".rwzButton.rwzPrevious").prop("disabled", true);
                   $(".rwzButton.rwzPrevious").css('opacity', '0.6');
                   //hide
                   //$(".rwzButton.rwzPrevious").hide();
               }

    Regards,
    Nencho
    Telerik
Back to Top