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

Using Validations on RadPageView

1 Answer 133 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
E
Top achievements
Rank 1
E asked on 31 Aug 2014, 09:41 AM

I am trying to use Validations on RadPageView as below  and its not working (Paging not working):

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1">

        <Tabs>

            <telerik:RadTab Text="Tap1 "
Width="200px">

            </telerik:RadTab>

            <telerik:RadTab Text=" Tap2"
Width="200px">

            </telerik:RadTab>

            <telerik:RadTab Text=" Tap3 Width="200px">

            </telerik:RadTab>

        </Tabs>

    </telerik:RadTabStrip>

    <telerik:RadMultiPage runat="server"
ID="RadMultiPage1"
SelectedIndex="0"
CssClass="outerMultiPage">

     

        <telerik:RadPageView runat="server"
ID="RadPageView2">

            <div class="ClientClass">

               
<table>

 

                   
<tr>

                        <td>

                            <div class="classImg">

                                <telerik:RadXmlHttpPanel runat="server"
Height="240px"
ID="radxmlhttppanel1"
Value="3"

                                    CssClass="xmlpanelcustomerinfo">

                                    <div class="classDiv">

                                        <table cellpadding="5px"
cellspacing="5px"
frame="border"
rules="groups"
style="position: absolute">

                                            <tr>

                                               
<td
style="width: 120px;">

                                                   
Phone:

                                               
</td>

                                               
<td
style="width: 150px;">

                                                   
<asp:TextBox ID="PhoneTextBox"
runat="server"
Width="116px"
MaxLength="12"></asp:TextBox>

                                                </td>

                                             <td style="width: 200px;">

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

                                                       
Display="Dynamic"
ErrorMessage="RequiredFieldValidator"
ForeColor="Red">Required</asp:RequiredFieldValidator>

                                                    <asp:CustomValidator
ID="CustomValidator2" runat="server"
Display="Dynamic" ControlToValidate="PhoneTextBox"

                                                       
ClientValidationFunction="Validate_Sender"
ForeColor="Red">Invalid Phone</asp:CustomValidator>

                                               
</td>

 

                                            </tr>

                                            <tr>

                                               
<td
style="width: 200px;">

                                                   
Message Sender:

                                               
</td>

                                               
<td
style="width: 150px;">

                                                   
<asp:TextBox ID="sendertxt"
runat="server"
Width="116px"
MaxLength="11"></asp:TextBox>

                                               
</td>

                                            

 <td style="width: 200px;">

                                                   
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="sendertxt"

                                                       
Display="Dynamic"
ErrorMessage="RequiredFieldValidator"
ForeColor="Red">Required</asp:RequiredFieldValidator>

                                                   
<%--</td>--%>

                                                   
<%--<td style="width:200px;">--%>

                                                 
<%-- 
<asp:CustomValidator ID="CustomValidator1"
runat="server" Display="Dynamic"
ControlToValidate="sendertxt"

    
                                                   ClientValidationFunction="Validate_Sender"
ForeColor="Red">Invalid message sender</asp:CustomValidator>

                                               
</td>

                                            </tr>

                                            <tr>

                                               
<td
style="width: 200px;">

                                                   
Msessage Text:

                                               
</td>

                                               
<td>

                                                    <asp:TextBox ID="msgtxt" runat="server"
TextMode="MultiLine"
Height="88px"
Width="280px"

                                                       
onkeyup="Update_Length_Label('bodyContent_msgtxt',
'bodyContent_length_lbl')"></asp:TextBox>

                                               
</td>

 

 <td>

                                                    <asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"
ControlToValidate="msgtxt"

                                                       
ErrorMessage="RequiredFieldValidator"
Text="Required" ForeColor="Red">Reuired</asp:RequiredFieldValidator>

                                               
</td>

 

                                            </tr>

                                            <tr>

                                                <td>

                                                   
Message Length:

                                               
</td>

                                               
<td
colspan="2">

                                                   
<asp:Label ID="length_lbl"
runat="server"
Width="280px"
ViewStateMode="Enabled"></asp:Label>

                                               
</td>

                                            </tr>

                                            <tr style="height: 10px;">

                                            </tr>

                                            <tr>

                                               
<td
colspan="2">

                                                   
<asp:Button ID="Savebtn"
runat="server"
Text="Send"
Font-Bold="False"
Font-Size="Large"

                                                       
ForeColor="#333333"
Height="27px"
Width="85px"
OnClick="Sendbtn_Click"
/>

                                               
</td>

             
                              </tr>

                                        </table>

                                    </div>

                                </telerik:RadXmlHttpPanel>

                            </div>

                        </td>

                   
</tr>

               
</table>

            </div>

        </telerik:RadPageView>

    

    </telerik:RadMultiPage>

 

any suggestions  !!

 

 

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 04 Sep 2014, 06:13 AM
Hello,

You can refer to this help article where is described how the validation is working with RadTabStrip- By default, all validators on the Web page must be successful before the postback can occur. You can limit the controls that must be validated when the tab strip performs a post-back, while still allowing other controls on the Web page to be validated, by using Validation Groups. The validator controls have a ValidationGroup property. The tab strip also has a ValidationGroup property. The tab strip only causes validation by those validators whose ValidationGroup property matches the ValidationGroup property of the tab strip. (The reason the default behavior is for all validators to execute on post-back is because the default value of the ValidationGroup property on both RadTabStrip and validators is an empty string.).

Hope this information will be helpful.

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TabStrip
Asked by
E
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or