RadWizard and previous button

4 posts, 0 answers
  1. Glenn
    Glenn avatar
    6 posts
    Member since:
    Nov 2010

    Posted 08 Nov Link to this post

    Has anyone experienced a problem where the standard Previous button created by the RadWizard control always causes validation to occur when clicked?

    The Telerik documentation states that the previous button does not cause validation, however when I click previous, any field validators that fail will stop the wizard from moving to the previous step.

    I've looked through the object properties and methods but cannot find any way to modify the previous button properties.

    The version I'm using is 2015.2.623.40 according to the DLL file information.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 11 Nov Link to this post

    Hello Glenn,

    As stated in the documentation the same ValidationGroup must be set to both steps if you want to navigate from the second to the first one by pressing the Previous button. In order to demonstrate: in the following example the validation should not trigger when pressing the Previous button in the Step2, since both Step1 and Step2 have the same "personalInfo" ValidationGoup set:
    <telerik:RadWizard RenderMode="Lightweight" ID="RadWizard1" runat="server">
        <WizardSteps>
            <telerik:RadWizardStep ID="RadWizardStep1" Title="FirstStep" runat="server" StepType="Step" ValidationGroup="personalInfo">
                Step1
            </telerik:RadWizardStep>
            <telerik:RadWizardStep ID="RadWizardStep2" Title="SecondStep" ValidationGroup="personalInfo" CausesValidation="true">
                Step2
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="TextBox1RequiredFieldValidator1" runat="server"
                    ControlToValidate="TextBox1" EnableClientScript="true" ValidationGroup="personalInfo" ErrorMessage="required field"
                    CssClass="validator" ForeColor="Red"></asp:RequiredFieldValidator>
            </telerik:RadWizardStep>
            <telerik:RadWizardStep ID="RadWizardStep3" Title="ThirdStep" runat="server" StepType="Step">
                Step3
            </telerik:RadWizardStep>
        </WizardSteps>
    </telerik:RadWizard>


    Regards,
    Ivan Danchev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Glenn
    Glenn avatar
    6 posts
    Member since:
    Nov 2010

    Posted 14 Nov in reply to Ivan Danchev Link to this post

    Thank you Ivan,

    I created a test module in our environment with only a single RadWizard with each step having a different validation group and it worked as described in the documentation: the previous button did not trigger validation between the steps. 

    At this point, I've determined that there's something in our environment that's interfering with the Telerik navigation and we're going to re-design the module.

    Thanks for your help.

    Below, is the test control with different validation groups:

    <telerik:RadWizard ID="wizTest" runat="server" OnNextButtonClick="wizTest_NextButtonClick">
        <WizardSteps>
            <telerik:RadWizardStep ID="WizardStep1" runat="server" ValidationGroup="Group1" CausesValidation="true">
                <div style="text-decoration:line-through;">
                    <asp:Label ID="Label1" runat="server" AssociatedControlID="TextBox1" Text="Value 1" />
                    <asp:TextBox ID="TextBox1" runat="server" ValidationGroup="Group1" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" Text=" *" ValidationGroup="Group1" />
                </div>
            </telerik:RadWizardStep>
            <telerik:RadWizardStep ID="WizardStep2" runat="server" ValidationGroup="Group2" CausesValidation="true">
                <asp:Label ID="Label2" runat="server" AssociatedControlID="TextBox2" Text="Value 2" />
                <asp:TextBox ID="TextBox2" runat="server" ValidationGroup="Group2" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" Text=" *" ValidationGroup="Group2" />
            </telerik:RadWizardStep>
            <telerik:RadWizardStep ID="WizardStep3" runat="server" ValidationGroup="Group3" CausesValidation="true">
                <asp:Label ID="Label3" runat="server" AssociatedControlID="TextBox3" Text="Value 3" />
                <asp:TextBox ID="TextBox3" runat="server" ValidationGroup="Group3" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3" Text=" *" ValidationGroup="Group3" />
            </telerik:RadWizardStep>
        </WizardSteps>
    </telerik:RadWizard>
  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 17 Nov Link to this post

    Hello Glenn,

    Thank you for getting back to us. Just to be clear the same validation group must be set to two steps if you want to navigate back with the Previous button without triggering the validation. Different validation groups should be set to the steps if you want the validation to be triggered on Previous button click. I got the impression that you understood it the other way around so just wanted to clear that up and avoid any confusion.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Back to Top