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

Valiodator Callout Extender SetFocus to Tab

4 Answers 24 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
sircutbreaker
Top achievements
Rank 1
sircutbreaker asked on 15 Aug 2009, 10:08 PM
if I have several textboxes in a radmultipage controlled by a radtabstrip...
and there are required fields... and I have the validators set to setfocusonerr...

how can I make the tabstrip go to the tab that contains the textbox with the current validator that is firing off when i press the update/insert button in the user control?

Any help would be appreciated.

Jeff

4 Answers, 1 is accepted

Sort by
0
sircutbreaker
Top achievements
Rank 1
answered on 16 Aug 2009, 04:00 AM
even if i can just have a client side routine that places the selected tab back to the first one.. that would suffice..

0
Paul
Telerik team
answered on 20 Aug 2009, 12:39 PM
Hello sircutbreaker,

You can select particular tab by using one of the following RadTab client-side methods - set_selected(), select() or click(). For details on the matter please refer to this help article.

Regards,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
sircutbreaker
Top achievements
Rank 1
answered on 25 Aug 2009, 07:10 PM
Yes, but how would I have the required field validator fire off the javascript ?

I am using standard asp.net validation controls.
0
Paul
Telerik team
answered on 26 Aug 2009, 02:21 PM
Hi sircutbreaker,

You can use the click() method, i.e.

<form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
 
    <script type="text/javascript"
        function test() { 
            var tabstrip = $find('<%= RadTabStrip1.ClientID %>') 
            tabstrip.get_tabs().getTab(1).click(); 
        }     
    </script> 
 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" 
        SelectedIndex="0"
        <Tabs> 
            <telerik:RadTab runat="server" Text="Root RadTab1"
            </telerik:RadTab> 
            <telerik:RadTab runat="server" Text="Root RadTab2"
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
        <telerik:RadPageView ID="RadPageView1" runat="server"
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" 
                ControlToValidate="TextBox1"></asp:RequiredFieldValidator></telerik:RadPageView> 
        <telerik:RadPageView ID="RadPageView2" runat="server"
            page2 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 
    <input id="Button1" type="button" value="button" onclick="test()" /> 
    </form> 


All the best,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TabStrip
Asked by
sircutbreaker
Top achievements
Rank 1
Answers by
sircutbreaker
Top achievements
Rank 1
Paul
Telerik team
Share this question
or