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

About loading data with ajax

1 Answer 224 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
JIA DONG
Top achievements
Rank 1
JIA DONG asked on 14 Sep 2011, 08:03 AM
first, this's a great thing. 
I have seen the API and demo. Then for a Test,for the TabStrip.

Loading content with AJAX ,this does not work!


I view the API in kendoui.com ,it doesn't work too.

what's the matter?

I Want to add a new Tab , this tab loading content with ajax.

how can I write the code? the API doesn't have a prompt, it doesn't have any description about the params.

this is my code, not work too.

var tabStrip=$("#tabstrip").kendoTabStrip().data("kendoTabStrip");
tabStrip.insertAfter([{text:"New Tab3",content:[null,"http://www.danamy.cn/index.html"]},{text:"New Tab4"}],tabStrip.tabGroup.children("li:last"));

I'm Chinese , English is so so. - -.

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 15 Sep 2011, 10:06 AM
Hello Jia Dong,

Unfortunately adding items with Ajax loaded content is not possible through the current API. We patched it up for the next beta, until then you can use the attached minified TabStrip source as a workaround (or initialize all tabs from the start), like this:
tabStrip.append(
    [{
        text: "New Tab3",
        contentUrl: "ajax/ajaxContent1.html"
    },
    {
        text: "New Tab4",
        content: "Test"
    }],
    tabStrip.tabGroup
);


Kind 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!
Tags
TabStrip
Asked by
JIA DONG
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or