1 Answer, 1 is accepted
Hi Itamar,
The Next button of RadWizard is common for all steps, but you can change its text dynamically when the active step is changed. For example, you can do that in the OnClientButtonClicked event of the control:
<script>
function onButtonClicked(wizard, args) {
var secondStepTitle = "Second step Title";
wizard.get_nextButtonElement().innerText = "Next";
if (wizard.get_activeWizardStep().get_title() == secondStepTitle) {
wizard.get_nextButtonElement().innerText = "Custom Next"
}
}
</script>
<telerik:RadWizard RenderMode="Lightweight" ID="RadWizard1" runat="server" Height="420px" OnClientButtonClicked="onButtonClicked">
<WizardSteps>
....
Regards,
Vessy
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hey unfortunately this approach doesnt seem to be working,the function runs but the buttons text remains the same , also if i change my 2nd(of 3 steps) to "Steptype -finish" the next button remains on the page.... cant get rid of it
Hello Itamar,
I tested the suggested sample and it behaves properly at my end. Please, note, that the Finish button remains when the StepType="Finish". If you want to have a final step without any buttons, you will need to set the StepType="Complete" like demonstrated in the following video:
Below you can see the setup I used for my the video above:
<script>
function onButtonClicked(wizard, args) {
var secondStepTitle = "Second step Title";
wizard.get_nextButtonElement().innerText = "Next";
if (wizard.get_activeWizardStep().get_title() == secondStepTitle) {
wizard.get_nextButtonElement().innerText = "Custom Next"
}
}
</script>
<telerik:RadWizard ID="rwzSWAssessment" runat="server" Width="550px"
OnClientButtonClicked="onButtonClicked">
<WizardSteps>
<telerik:RadWizardStep Title="Start">
Step 1
</telerik:RadWizardStep>
<telerik:RadWizardStep Title="Second step Title">
Step 2
</telerik:RadWizardStep>
<telerik:RadWizardStep Title="F3">
Step 3
</telerik:RadWizardStep>
<telerik:RadWizardStep Title="F4">
Step 4
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="rwsSummary" Title="Overall" StepType="Complete">
Complete!
</telerik:RadWizardStep>
</WizardSteps>
</telerik:RadWizard>