Binding with array, can't select first tab

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

    Posted 24 Apr 2012 Link to this post

    <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>

    //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

    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:
  2. Kamen Bundev
    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?

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