0

I have use Radtapstrip with six tabs.

i have mandatory fields on first tab with validation. if i click button with first tab validation is working fine.when i click 2,3,4,5 and 6th tab validation does not working. i need render to first tab if i have not filled mandatory fields on first tab. please guide me. Thanks.

<telerik:RadTabStrip ID="radtabData" runat="server" ClickSelectedTab="true" TabIndex="0" MultiPageID="radMultiPage2" SelectedIndex="0"   ShowBaseLine="True" EnableEmbeddedSkins="False" Skin="Sunset" >
<Tabs>
<telerik:RadTab PageViewID="pvTab1" TabIndex="0" Text="Client Information" Value="ClientInformation" SelectedCssClass="rtsDisabled" >
</telerik:RadTab>
<telerik:RadTab PageViewID="pvTab2" TabIndex="1" Text="Pre Clinical Exam" Value="PreClinicalExam"></telerik:RadTab>
<telerik:RadTab PageViewID="pvTab3" TabIndex="2" Text="Procedure" Value="Procedure">
</telerik:RadTab>
<telerik:RadTab PageViewID="pvTab4" TabIndex="3" Text="Client Medical History" Value="ClientMedicalHistory"></telerik:RadTab>
<telerik:RadTab PageViewID="pvTab5" TabIndex="4" Text="Post Clinical Exam" Value="PostClinicalExam"></telerik:RadTab>
<telerik:RadTab PageViewID="pvTab6" TabIndex="5" Text="Custom" Value="Custom">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>

<telerik:RadMultiPage ID="radMultiPage2" runat="server" CssClass="MultipageWrapper" SelectedIndex="0" Style="width: 1000px;" BorderColor="Gray" BorderWidth="1px">

<telerik:RadPageView ID="pvTab1" runat="Server">
 .
 .
</telerik:Radpageview>

<telerik:RadPageView ID="pvTab2" runat="Server">
 .
 .
</telerik:Radpageview>
<telerik:RadPageView ID="pvTab3" runat="Server">
 .
 .
</telerik:Radpageview>

<telerik:RadPageView ID="pvTab4" runat="Server">
 .
 .
</telerik:Radpageview>
<telerik:RadPageView ID="pvTab5" runat="Server">
 .
 .
</telerik:Radpageview>

<telerik:RadPageView ID="pvTab6" runat="Server">
 .
 .
</telerik:Radpageview>
</telerik:RadMultiPage>
Tony L.
  • 17,638
  • 8
  • 69
  • 66
Kesavan M
  • 19
  • 6
  • You'll need too provide more code than that, without sufficient detail people will be unable to assist you. – talegna Nov 11 '13 at 15:10

1 Answers1

0

One method I can come up with is to validate the page on load, if the page is not valid you could then programmatically set the telerik:RadMultiPage element to display the

public void Page_Load(object sender, EventArgs e)
{
    Validate("myValidationGroupName");
    if ((Page.IsValid)) {
        RadTabStrip.Tabs[i].Selected = true
        radMultiPage2.PageViews[0].Selected = true;
    }
}

You will also probably want to set the telerik:RadTabStrip to validate before submitting preventing the page from being navigated from before the required/validated fields are populated/validated.

<telerik:RadTabStrip ... CausesValidation="true" ValidationGroup="myValidationGroupName">

In the code examples used I have used a ValidationGroup, I have done this as it is possible that you have other "Validation Groups" on the page which you do not want preventing navigation from the first page.

talegna
  • 2,407
  • 2
  • 19
  • 22