Radwizard validation

2 posts, 0 answers
  1. Anil
    Anil avatar
    1 posts
    Member since:
    Apr 2011

    Posted 22 Jun 2015 Link to this post

    Hi,

    I need to do validation of all steps in a radwizard when I click on a button outside wizard.

    Any suggestions on how to do this?

     

    Thanks,

    Anil

  2. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 23 Jun 2015 Link to this post

    Hi Anil,

    You can set the steps and the button with the same validation group as for example in the code below:
    <telerik:RadWizard ID="RadWizard6" runat="server">
             <WizardSteps>
                 <telerik:RadWizardStep ID="RadWizardStep1" Title="Personal Info" runat="server" StepType="Step" ValidationGroup="personalInfo">
                     <div class="inputWapper first">
                         <asp:Label ID="Label3" Text="First Name: *" runat="server" AssociatedControlID="FirstNameTextBox" />
                         <telerik:RadTextBox ID="FirstNameTextBox" runat="server" ValidationGroup="personalInfo" Width="320px"></telerik:RadTextBox>
                         <asp:RequiredFieldValidator ID="FirstNameRequiredFieldValidator" runat="server" ControlToValidate="FirstNameTextBox" EnableClientScript="true" ValidationGroup="personalInfo" ErrorMessage="required field" CssClass="validator" ForeColor="Red"></asp:RequiredFieldValidator>
                     </div>
                     <div class="inputWapper">
                         <asp:Label ID="Label4" Text="Last Name: *" runat="server" AssociatedControlID="LastNameTextBox" />
                         <telerik:RadTextBox ID="LastNameTextBox" runat="server" ValidationGroup="personalInfo" Width="320px"></telerik:RadTextBox>
                         <asp:RequiredFieldValidator ID="LastNameRequiredFieldValidator" runat="server" ControlToValidate="LastNameTextBox" EnableClientScript="true" ValidationGroup="personalInfo" ErrorMessage="required field" CssClass="validator" ForeColor="Red"></asp:RequiredFieldValidator>
                     </div>
                 </telerik:RadWizardStep>
                 <telerik:RadWizardStep Title="SecondStep">
                     <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                 </telerik:RadWizardStep>
                  <telerik:RadWizardStep Title="third">
                     <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                 </telerik:RadWizardStep>
             </WizardSteps>
         </telerik:RadWizard>
     
         <asp:Button Text="text" runat="server" ValidationGroup="personalInfo" />

    Hope this will help you solve the issue.

    Regards,
    Plamen
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top