disable next button

4 posts, 0 answers
  1. MBEN
    MBEN avatar
    159 posts
    Member since:
    Nov 2011

    Posted 31 Aug Link to this post

    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?

  2. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 01 Sep Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. MBEN
    MBEN avatar
    159 posts
    Member since:
    Nov 2011

    Posted 01 Sep in reply to Rumen Link to this post

    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 ?
  5. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 02 Sep Link to this post

    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
Back to Top