3 Answers, 1 is accepted
0
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:
2. You can prevent the user from navigating trough the wizard by canceling the OnClientButtonClicking client-side event:
for other commends, refer to this article
3. You can use the asp:Timer to navigate to the next step in the following manner:
In addition, in the attachment you can find a simple example, of the above suggested approaches.
Hope this would help.
Regards,
Nencho
Telerik
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
);
}
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
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:
Regards,
Nencho
Telerik
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