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

Setting tab client side

1 Answer 72 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 30 Jan 2009, 06:20 PM
Hi, is it possible to set the selected tab index and associated pageView page, using client side programming? I cant find much on the site regarding this. Thanks.

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 03 Feb 2009, 02:49 PM
Hi Karl,

Please find below a sample code snippet that shows the needed approach.

<form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
 
    <script type="text/javascript"
    function setTab() 
    { 
       var tabstrip = $find('<%= RadTabStrip1.ClientID %>'); 
       tabstrip.findTabByText("Root RadTab2").click(); 
    } 
    </script> 
 
    <input id="Button1" type="button" value="button" onclick="setTab()" /> 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
        <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"
        <telerik:RadPageView ID="RadPageView1" runat="server"
            RadPageView1</telerik:RadPageView> 
        <telerik:RadPageView ID="RadPageView2" runat="server"
            RadPageView2</telerik:RadPageView> 
    </telerik:RadMultiPage> 
</form> 


Greetings,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TabStrip
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or