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

disable next button

3 Answers 168 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
MBEN
Top achievements
Rank 1
Veteran
MBEN asked on 31 Aug 2016, 10:43 PM

Hi,

I have 4 tabs in my wizard loaded in user controls. On the first tab, based on a selection, I want to disable the next button to stop the user from going any further.

How can I achieve that?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Sep 2016, 06:51 AM
Hi,


You can use the set_enabled(false) client-side method to disable the desired tab

<script type="text/javascript">
    function OnClientButtonClicking(sender, args) {
  
        if (args.get_command() === Telerik.Web.UI.WizardCommand.Next) {
            args.get_nextActiveStep().set_enabled(false);
        }
    }
</script>
<telerik:RadWizard runat="server" ID="RadWizard1" OnClientButtonClicking="OnClientButtonClicking" Height="400px">
...
</telerik:RadWizard>


You can also disable the steps as for example it is done in this online demo with the code below:
Copy Code
window.OnClientLoad = function(sender, args) {
    for (var i = 1; i < sender.get_wizardSteps().get_count() ; i++) {
        sender.get_wizardSteps().getWizardStep(i).set_enabled(false);
    }
}


Regards,
Rumen
Telerik by Progress
0
MBEN
Top achievements
Rank 1
Veteran
answered on 01 Sep 2016, 05:00 PM
I have my code in  a user control. The tab page has a radio button and on selection of one of the radio buttons, I want to stop the user from moving forward. I have the clientclicking event in my aspx page but how do I check the condition from the user control ?
0
Rumen
Telerik team
answered on 02 Sep 2016, 09:36 AM
Hi,

I'm not sure about your exact code, but the provided solutions in these KB articles should help:
If you need any further help, please open a support ticket and provide a simple working project which demonstrates your scenario.

Kind regards,
Rumen
Telerik by Progress
Tags
Wizard
Asked by
MBEN
Top achievements
Rank 1
Veteran
Answers by
Rumen
Telerik team
MBEN
Top achievements
Rank 1
Veteran
Share this question
or