anable to find object of TabStrip in javascript?

3 posts, 1 answers
  1. aditya pratap
    aditya pratap avatar
    5 posts
    Member since:
    Aug 2011

    Posted 29 Apr 2013 Link to this post

       var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
        alert(tabStrip);

    I am using Rad Tab Strip in my page. i want to get tabstrip object at javascript like coding above..
    but it shows null in alert. how to resolve it?
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 30 Apr 2013 Link to this post

    Hi,

    Please have a look at the following sample code I tried to access to access the RadTabStrip in JavaScript and add a RadTab from client side.

    JavaScript:
    <script type="text/javascript">
        function AddTab(sender, args) {
            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
            var tab = new Telerik.Web.UI.RadTab();
            tab.set_text("New Tab");
            tabStrip.trackChanges();
            tabStrip.get_tabs().add(tab);
            tabStrip.commitChanges();
        }
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. aditya pratap
    aditya pratap avatar
    5 posts
    Member since:
    Aug 2011

    Posted 30 Apr 2013 Link to this post

    thanks for reply. actually i used this code in external javascript file. when i used it on .aspx page it solved..
    can u help me how to get RadTabStrip object in external java script file.
Back to Top