I see a similar question asked and answered at the link below but couldn't find anything similar in the Blazor forums. I would like to rename the last button from Done to Submit.
Rad wizard next button text in UI for ASP.NET AJAX | Telerik Forums
2 Answers, 1 is accepted

You can rename the last button from Done
to Submit
by using custom Wizard buttons as documented here: Custom Buttons Documentation.
In this case, it is also a good idea to explicitly call the Wizard lifecycle events like OnFinish
to maintain the desired functionality. This approach ensures your Wizard completes as expected even when using custom buttons. Refer to the relevant documentation here: Call OnChange and OnFinish From Button OnClick.
Regards,
Anislav Atanasov
Hi Anislav,
Thank you for explaining this perfectly and helping the community.
Your effort and time are appreciated.
Kind Regards,
Hris
<WizardButtons>
@{
var currentStepIndex = context;
if (currentStepIndex > 0)
{
<TelerikButton OnClick="@( () => PreviousClick(currentStepIndex) )">Back</TelerikButton>
}
if (currentStepIndex <= 2)
{
<TelerikButton ThemeColor="primary" OnClick="@( () => NextClick(currentStepIndex) )">Next</TelerikButton>
}
else
{
<TelerikButton ThemeColor="primary" OnClick="@SubmitClick">Submit</TelerikButton>
}
}
</WizardButtons>
...
@code {
...
private async Task NextClick(int currentStepIndex)
{
var args = new WizardStepChangeEventArgs() {
IsCancelled = false,
TargetIndex = currentStepIndex + 1
};
if (args.TargetIndex == 1)
OnUserStepChange(args);
else if (args.TargetIndex == 2)
OnAddrStepChange(args);
else if (args.TargetIndex == 3)
OnCardStepChange(args);
if (!args.IsCancelled)
{
wizardStep = currentStepIndex + 1;
}
}
private async Task PreviousClick(int newStepIndex)
{
wizardStep = newStepIndex - 1;
}
private async Task SubmitClick()
{
await OnFinishHandler();
}
...
}
Regards,
Tim
I agree, it's definitely overkill to go through all that just to rename a button. In the link you provided, the same result is achieved using JavaScript. While you can apply a similar approach in Blazor, it's not a particularly clean solution for changing labels with JavaScript either.
Regards,
Anislav Atanasov
Hi Tim,
You can simulate localization without resource files for specific labels in the Telerik components. The linked example is exactly for the Wizard.
Regards,
Dimo
Progress Telerik
Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!