Validation Controls Frozen Tabs

17 posts, 0 answers
  1. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 17 Nov 2011 Link to this post

    Dear All,

    I have 3 tabs in a tab strip and 3 multi page views. inside these multi page views are three tables i.e. code of three pages one by one.

    First multipageview contains a form with a few text fields etc. When I use validation controls, like required field validation, on first tab's form it do not allow me to go to the next tab untill the validation is done on the form. I want it to go to next tab without validation. or in other words I want it to do validation only on the button clicked on respective tab, not when a tab is clicked.

    Please help.
  2. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 17 Nov 2011 Link to this post

    Solved it myslef by using ValidationGroup aurgument, setting validation group of the validation control and the button same.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 23 Jan 2012 Link to this post

    i put the solution because I am having the same problem
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Jan 2012 Link to this post

    Hello,

    Take a look at the following demo.
    TabStrip / Validation Groups

    -Shinu.
  6. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 23 Jan 2012 Link to this post

    but I wanted to validate group only when I click the send button!
  7. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 24 Jan 2012 Link to this post

    hello Toby,

    I was working on a large size project so wont be able to port whole project here but following is an example.. please check if it helps. Key is give ValidationGroup same to the validation controls and button.


    Example of Control... check the ValidationGroup parameter 

    <telerik:RadDatePicker ID="PaymentReqDate" runat="server">

                        <Calendar ID="Calendar1" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">

                        </Calendar>

                        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

                        <DateInput ID="DateInput1" runat="server" DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"></DateInput>

                    </telerik:RadDatePicker>

                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"

                        ControlToValidate="PaymentReqDate" ErrorMessage="Please Enter The Payment Required Date" ValidationGroup="abc">*</asp:RequiredFieldValidator>


    //Example of Summary... 

    <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Rectify These Errors" ValidationGroup="abc" />


    //Example of Button

    <asp:Button ID="btnSubmit" runat="server" Text="Submit" ForeColor="#4c79a6"

                ValidationGroup="abc" onclick="btnSubmit_Click" />






  8. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    when I validate it by clicking the submit button sends the radtabstrip but not in the ValidationGroup and it sends regardless of the fields that have validation, would validate the fields when clicking the submit button, I'm using the button and not the telerik the asp does it have another treatment for the telerik?

    <telerik:RadTabStrip ID="RadTabStrip1" runat="server"
                        ontabclick="RadTabStrip1_TabClick" SelectedIndex="0" Skin="Black"
                        MultiPageID="RadMultiPage1" CssClass="tabStrip" >
                    
                        <Tabs>
                            <telerik:RadTab runat="server" Text="Seja um Representante" Selected="True"  >
                            </telerik:RadTab>
                            <telerik:RadTab runat="server" Text="Solicite um Representante">
                            </telerik:RadTab>
                        </Tabs>
                    </telerik:RadTabStrip>
                    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
                            CssClass="multiPage" Height="16px" Width="401px" >
                        <telerik:RadPageView ID="RadPageView1" runat="server">
        
                           <label> * Nome</label>
                           <br />
                            <telerik:RadTextBox ID="Nome" runat="server" Height="15px" Width="300px"
                                ValidationGroup="Representante"> </telerik:RadTextBox>
                            <br />

                            <label> * Região de Atuação </label>
                            <br />
                             <telerik:RadTextBox ID="Regiao" runat="server" Height="15px" Width="300px"
                                ValidationGroup="Representante"></telerik:RadTextBox>
                           <br />
                            <label > Endereço </label>
                            <br />
                            <telerik:RadTextBox ID="Endereco" runat="server" Height="15px" Width="300px"
                                EmptyMessage="Rua joão da silvea " ValidationGroup="Representante">
                            </telerik:RadTextBox>
                            <br />
                            <label> Complemento</label>
                            <br />
                            <telerik:RadTextBox ID="Complemento" runat="server" Height="15px" Width="300px"
                                EmptyMessage="Nº 123 Bairro vila alta  " ValidationGroup="Representante">
                            </telerik:RadTextBox>
                            <br />
                        <label>Cidade </label>
                        <br />
                            <telerik:RadTextBox ID="Cidade" runat="server" Height="15px" Width="300px"
                                ValidationGroup="Representante" >
                            </telerik:RadTextBox>
                           
                            <br />
                             <label>Cep </label>
                             <br />
                            <telerik:RadNumericTextBox ID="cep" runat="server" DateFormat="00000-000"
                                DataType="System.Int16" EmptyMessage="00000-000" MaxLength="12"
                                ValidationGroup="Representante" >
                                <NumberFormat DecimalDigits="0" ZeroPattern="n" GroupSeparator="" />
                            </telerik:RadNumericTextBox>  <telerik:RadComboBox ID="comboestado" runat="server" Skin="Black" Width="60px">
                            
                                
                                   <Items>
                                <telerik:RadComboBoxItem Text="N/D" />
                               <telerik:RadComboBoxItem Text= "MA" />
                               <telerik:RadComboBoxItem Text="MT" />
                               <telerik:RadComboBoxItem Text="MS" />
                               <telerik:RadComboBoxItem Text= "MG" />
                               <telerik:RadComboBoxItem Text="PA" />
                               <telerik:RadComboBoxItem Text="PB" />
                               <telerik:RadComboBoxItem Text="PR" />
                               <telerik:RadComboBoxItem Text="PE" />
                               <telerik:RadComboBoxItem Text="PI" />
                               <telerik:RadComboBoxItem Text="RJ" />
                               <telerik:RadComboBoxItem Text="RS" />
                               <telerik:RadComboBoxItem Text="RO" />
                               <telerik:RadComboBoxItem Text="SC" />
                               <telerik:RadComboBoxItem Text="SP" />
                               <telerik:RadComboBoxItem Text="TO" />
                               <telerik:RadComboBoxItem Text="AC" />
                               <telerik:RadComboBoxItem Text="AL" />
                               <telerik:RadComboBoxItem Text="AP" />
                               <telerik:RadComboBoxItem Text="AM" />
                               <telerik:RadComboBoxItem Text="BA" />
                               <telerik:RadComboBoxItem Text="DF" />
                               <telerik:RadComboBoxItem Text="ES" />
                               <telerik:RadComboBoxItem Text="GO" />
                                


                                </Items>
                                

                                <WebServiceSettings>
                                    <ODataSettings InitialContainerName="">
                                    </ODataSettings>
                                </WebServiceSettings>
                            </telerik:RadComboBox>
                            <br />
                            <label>Falar Com </label>
                            <br />
                            <telerik:RadTextBox ID="falarcom" runat="server"
                                ValidationGroup="Representante">
                            </telerik:RadTextBox>
                            <br />
                            <label>DDD + NUMERO </label>
                            <br />
                            <telerik:RadMaskedTextBox ID="tel" runat="server"
                                Mask="(###) ####-####" ValidationGroup="Representante">
                            </telerik:RadMaskedTextBox>
                            <br />
                             <label>Email: </label>
                             <br />
                            <telerik:RadTextBox ID="email" runat="server" Height="15px" Width="300px"
                                ValidationGroup="representante">
                            </telerik:RadTextBox><br />
                            <asp:RegularExpressionValidator ID="emailValidator" runat="server" Display="Dynamic"
    ErrorMessage="Por favor, entra com e-mail válido." ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
    ControlToValidate="email" ValidationGroup="Representante"></asp:RegularExpressionValidator> <br />
    <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" Display="Dynamic"
    ControlToValidate="email" ErrorMessage="Por favor, entre com seu e-mail!" ValidationGroup="Representante" />
                            <br />
                            <label>Breve comentário sobre você : </label>
                            <br />
                            
                            <asp:TextBox runat="server" ID="comentario" Rows="10" TextMode="MultiLine"
                                Width="300px" ValidationGroup="Representante"></asp:TextBox>
                              <br />

                            

                        <br />
                         <input type="button" value="Limpar" id="btnSend" onclick="return btnSend_onclick()" />
                            <telerik:RadButton ID="RadButton1" runat="server" Text="Enviar"
                                onclick="RadButton1_Click" Skin="Black"
                                OnClientClicking ="btnSend_onclick()"  >
                            </telerik:RadButton>
  9. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 25 Jan 2012 Link to this post

    Add Validation group in button as well... or send me complete file.
  10. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    added as and when I click it does not send the form, it only sends if I take the group, is there anything else I should add


     <telerik:RadButton ID="RadButton1" runat="server" Text="Enviar" ValidationGroup="Representante"
                                onclick="RadButton1_Click" Skin="Black"
                                OnClientClicking ="btnSend_onclick()"  >
                            </telerik:RadButton>
  11. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 25 Jan 2012 Link to this post

    send me a stand alone file I'll see if I can help.
  12. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    send you a picture of my tabstrip of a look and see where I'm wrong
  13. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 25 Jan 2012 Link to this post

    how can I debug a picture ? ... keep the things simple... make a dummy page add only one text box and a button and check it. if it does not work attach that page and send here. I'll help if I could.
  14. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    ok !
  15. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    Abdul the site has my file upload limit is 8MB and have you send me an email I send.

    toboyramos@gmail.com
  16. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 25 Jan 2012 Link to this post

    Abdul could reduce the project by deleting the dll from telerik, anything you just added in the bin folder ok

    I'm just not able to attach only because the site attached images
  17. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 26 Jan 2012 Link to this post

    abdul.ahad@pepsico.com

    make sure you send me only one file. 
  18. Toboy
    Toboy avatar
    28 posts
    Member since:
    Jan 2012

    Posted 26 Jan 2012 Link to this post

    I sent you ok
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017