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

Client-side object

3 Answers 84 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 2
Rob asked on 05 Aug 2008, 12:02 PM
Hi there,

I'm trying to get hold of the tabstrip object to be able to enable and disable tabs on the client-side.

Following the example here:
http://www.telerik.com/help/aspnet/tabstrip/tab_enable%20or%20disable%20the%20tabstrip.html

doesn't seem to work as it doesn't have the get_tabs() method on it.

How can I get hold of this object? What is passed during the onclinetload event for example?

Cheers,

Rob

3 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 05 Aug 2008, 12:16 PM
Hello Rob,

You are reading the help for RadTabStrip for ASP.NET "Classic, but your forum post is under RadTabStrip for ASP.NET AJAX category. For details on how to achieve your goal please refer to the RadTabStrip for ASP.NET AJAX documentation (article RadTab object).

All the best,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rob
Top achievements
Rank 2
answered on 05 Aug 2008, 12:53 PM
Ahh thanks for this,

I have already tried using $find, but it always returns null even though I can see the object in the page:

Sys.Application.findComponent("ctl00_ctl00_ctl00_MainContent_PageContent_Body_radTabs");
null

$find("ctl00_ctl00_ctl00_MainContent_PageContent_Body_radTabs");
null

var tabs = $find(""" + this.radTabs.ClientID + @""")
null
0
Accepted
Paul
Telerik team
answered on 05 Aug 2008, 12:58 PM
Hello Rob,

If you're trying to find the tabstrip on page load, you can try renaming your function to function pageLoad(). pageLoad is a shortcut for the Sys.Application.load event. For details on the matter please refer to the following ASP.NET article.

Example:
<html xmlns="http://www.w3.org/1999/xhtml">     
<head>    
    <title>Untitled Page</title>    
</head>    
<body>    
    <form id="form1" runat="server">     
        <asp:ScriptManager ID="ScriptManager1" runat="server" />    
        <script type="text/javascript" language="javascript">     
        function pageLoad()     
        {     
            var myTabStrip = $find("<%= RadTabStrip1.ClientID %>");     
            myTabStrip.enable();     
        }     
        </script>              
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" OnTabClick="RadTabStrip1_TabClick1">     
            <Tabs>      
                <telerik:RadTab runat="server" Text="Root RadTab1" />       
                <telerik:RadTab runat="server" Text="Root RadTab2" />    
                <telerik:RadTab runat="server" Text="Root RadTab3" />    
            </Tabs>      
        </telerik:RadTabStrip>      
    </form>    
</body>    
</html>   
 


Regards,
Paul
the Telerik team

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