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

Validation Controls Frozen Tabs

16 Answers 179 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Abdul
Top achievements
Rank 2
Abdul asked on 17 Nov 2011, 01:27 PM
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.

16 Answers, 1 is accepted

Sort by
0
Abdul
Top achievements
Rank 2
answered on 17 Nov 2011, 01:43 PM
Solved it myslef by using ValidationGroup aurgument, setting validation group of the validation control and the button same.
0
Toboy
Top achievements
Rank 1
answered on 23 Jan 2012, 01:47 PM
i put the solution because I am having the same problem
0
Shinu
Top achievements
Rank 2
answered on 23 Jan 2012, 02:15 PM
Hello,

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

-Shinu.
0
Toboy
Top achievements
Rank 1
answered on 23 Jan 2012, 03:44 PM
but I wanted to validate group only when I click the send button!
0
Abdul
Top achievements
Rank 2
answered on 24 Jan 2012, 07:32 AM
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" />






0
Toboy
Top achievements
Rank 1
answered on 25 Jan 2012, 02:14 PM
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>
0
Abdul
Top achievements
Rank 2
answered on 25 Jan 2012, 02:19 PM
Add Validation group in button as well... or send me complete file.
0
Toboy
Top achievements
Rank 1
answered on 25 Jan 2012, 02:24 PM
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>
0
Abdul
Top achievements
Rank 2
answered on 25 Jan 2012, 02:33 PM
send me a stand alone file I'll see if I can help.
0
Toboy
Top achievements
Rank 1
answered on 25 Jan 2012, 03:03 PM
send you a picture of my tabstrip of a look and see where I'm wrong
0
Abdul
Top achievements
Rank 2
answered on 25 Jan 2012, 03:11 PM
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.
0
Toboy
Top achievements
Rank 1
answered on 25 Jan 2012, 04:57 PM
ok !
0
Toboy
Top achievements
Rank 1
answered on 25 Jan 2012, 06:30 PM
Abdul the site has my file upload limit is 8MB and have you send me an email I send.

toboyramos@gmail.com
0
Toboy
Top achievements
Rank 1
answered on 25 Jan 2012, 07:13 PM
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
0
Abdul
Top achievements
Rank 2
answered on 26 Jan 2012, 07:01 AM
abdul.ahad@pepsico.com

make sure you send me only one file. 
0
Toboy
Top achievements
Rank 1
answered on 26 Jan 2012, 02:45 PM
I sent you ok
Tags
TabStrip
Asked by
Abdul
Top achievements
Rank 2
Answers by
Abdul
Top achievements
Rank 2
Toboy
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or