Client-side object

4 posts, 1 answers
  1. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 05 Aug 2008 Link to this post

    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
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 05 Aug 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 05 Aug 2008 Link to this post

    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
  5. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 05 Aug 2008 Link to this post

    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.
Back to Top