Binding with array, can't select first tab

2 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 24 Apr 2012 Link to this post

    Code:
    <ul class="kendo-tabstrip" runat="server" style="visibility:hidden">
        <li class="k-state-active">First Tab</li>
        <li>Second Tab</li>
        <li>Third Tab</li>
    </ul>
    <div>Tab1</div>
    <div>Tab2</div>
    <div>Tab3</div>

    //Create the tab data
            for (var i = 0; i < subtabcontainer.length; i++) {
                tabdata[i] = {
                    text: tabs[i].innerHTML,
                    content: subtabcontainer[i].innerHTML
                };
            }
     
            var tabstrip = $(this).kendoTabStrip({
                dataTextField: "text",
                dataContentField: "content",
                dataSource: tabdata
            }).data("kendoTabStrip").select(1);



    So it loops though some elements on the page, and builds up an array to bind to the tabstrip.  This all works great, however no tabs are selected when the page renders...if I manually click one all is good.

    I've even tried setTimeout after the tabstrip initialization to do the .select as well, but no dice.

    See here: http://screencast.com/t/Y22BMw27jsJ
  2. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 27 Apr 2012 Link to this post

    Hi Steve,

    I wasn't able to reproduce your issue - a tab is always selected here. Can you reproduce this problem in a jsFiddle or on a sample page?

    Regards,
    Kamen Bundev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top