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

Tab Ajax loading is not working properly when it is selected programatically

1 Answer 187 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 29 Jul 2015, 09:50 AM

While creating tabstrip, tabs are configured to load dynamically through Ajax loading.

Now when we click on the tab(one) manually it is loading contents properly via Ajax but when some other tab(two) is visible and we want to select tab(one) on click of a button on tab(two) its not loading via Ajax and an empty content pane is shown under the tab(one).

we created tabs via below code

            <div class="wrapper" style="width: 100%;">
                <kendo:tabStrip name="homeTabstrip" show="onShow" select="onSelect" activate="onActivate" contentLoad="onContentLoad">
                    <kendo:tabStrip-items>
                        <kendo:tabStrip-item text="Assessment"    contentUrl="${assessmentTab}"></kendo:tabStrip-item>
                        <kendo:tabStrip-item text="Search Result" contentUrl="${searchTab}"></kendo:tabStrip-item>
                        <kendo:tabStrip-item text="Administration"  selected="true" contentUrl="${adminTab}"></kendo:tabStrip-item>
                    </kendo:tabStrip-items>
                </kendo:tabStrip>
            </div>

Now to select tab(one) while sitting on tab(two) we use below code:

    var tabstrip = $("#homeTabstrip").kendoTabStrip().data("kendoTabStrip");

tabstrip.select(1);

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 31 Jul 2015, 07:33 AM

Hello Praveen,

your code instantiates the tabstrip again. Please check this help topic. Apart from that, the approach works as expected here.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TabStrip
Asked by
Praveen
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or