2

I`m using kendo for mvc. I have tabstrip with five tabs.

@(Html.Kendo().TabStrip()
 .Name("tabstrip")
 .Events(builder => builder.Select("onSelect"))
 .Items(tabstrip =>
      { tabstrip.Add()....
tabstrip.Add()....
tabstrip.Add()....
tabstrip.Add()....
tabstrip.Add()....}

So, I need to reload one of the tab (item) without reloading tabstrip at all. How can I do this?

P.S. I already have event .Select that represent special logic, thats why I can`t change it.

Sveta Antrapovich
  • 407
  • 2
  • 7
  • 17

1 Answers1

2

You can load a tab via ajax after the intial load. See if this works -->

    int tabToReload=2;
    var tabstrip = $("#tabstrip").data("kendoTabStrip");
    loadTabStripTab($(tabstrip.contentElement(tabToReload)),'@Url.Action("SomeAction","SomeController")', someID);

    function loadTabStripTab(tab,actionUrl,someID)
    {
        $.ajax({
            type: "GET",
            url: actionUrl,
            datatype: "json",
            traditional: true,
            data: { SomeID : someID },
            success: function (data, status, xhr) {
                tab.html( data);
            },
            error: function (xhr, status, error) {
                tab.html( data);
            }
        });
    }
Ross Bush
  • 14,648
  • 2
  • 32
  • 55