This is a migrated thread and some comments may be shown as answers.

Disable steps

3 Answers 365 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
abigail
Top achievements
Rank 2
abigail asked on 29 Jan 2016, 02:44 PM
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

3 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 03 Feb 2016, 01:25 PM
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
0
abigail
Top achievements
Rank 2
answered on 09 Feb 2016, 04:42 AM
Sorry but I can't hide the button in wich method I set the code to hide the buttons?
0
Nencho
Telerik team
answered on 11 Feb 2016, 01:06 PM
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
Tags
Wizard
Asked by
abigail
Top achievements
Rank 2
Answers by
Nencho
Telerik team
abigail
Top achievements
Rank 2
Share this question
or