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

RadWizard and previous button

3 Answers 369 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 1
Glenn asked on 08 Nov 2016, 05:19 PM

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.

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 11 Nov 2016, 11:28 AM
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.
0
Glenn
Top achievements
Rank 1
answered on 14 Nov 2016, 02:56 PM

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>
0
Ivan Danchev
Telerik team
answered on 17 Nov 2016, 08:35 AM
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.
Tags
Wizard
Asked by
Glenn
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Glenn
Top achievements
Rank 1
Share this question
or