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

setting validation group

1 Answer 12 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
MBEN
Top achievements
Rank 1
Veteran
MBEN asked on 25 Nov 2013, 09:48 PM
I have a radtabstrip that I use as a wizard.
Each tab is a usercontrol. The user can navigate between the tabs using the prev and next buttons on the page or by clicking on the tabs.

I have a customvalidator on each of my tabs. They seem to work fine on the prev/next buttons. However when i use the tabs to navigate the validation does not work right the first time.

I am setting my validationgroup for the tabstrip as below:

<telerik:RadTabStrip ID="rtsBeneficiaryChange" SelectedIndex="0" runat="server" MultiPageID="rmBeneficiaryChange"
                    OnTabClick="rtsBeneficiaryChange_TabClick" EnableEmbeddedSkins="false" Skin="MBen"
                    OnClientTabSelected="UpdateValidationGroup"
                    CausesValidation="true" AutoPostBack="true">
                </telerik:RadTabStrip>
 
script:
function UpdateValidationGroup(sender, args) {
                //            args.set_cancel(!Page_IsValid);
                var tabStrip = sender;
                var selectedTab = tabStrip.get_selectedTab();
                if (selectedTab != null)
                    tabStrip.ValidationGroup = selectedTab.get_value();
                alert(tabStrip.ValidationGroup);
            }
    protected void rtsBeneficiaryChange_TabClick(object sender, RadTabStripEventArgs e)
    {
 
        Page.Validate(rtsBeneficiaryChange.ValidationGroup);
        if (Page.IsValid)
            rtsBeneficiaryChange.ValidationGroup = e.Tab.Value;
}

It seems the validationgroup is not being set right when i use the prev/next buttons on each tab.
Can you suggest what I am doing wrong?

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 28 Nov 2013, 03:03 PM
Hello MBEN,

I tried replicating the described issue, but I am afraid that I am not aware of the complete implementation that you are using at your end and probably this is the reason why it is working properly at my end. My suggestion would be to open a support ticket and attach a runnable sample, containing the isolated problem. Thus we would be able to inspect your implementation locally and troubleshoot the issue for you.


Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TabStrip
Asked by
MBEN
Top achievements
Rank 1
Veteran
Answers by
Nencho
Telerik team
Share this question
or