Search code examples
jqueryajaxmodel-view-controllerkendo-uikendo-tabstrip

Updating Kendo Strip Tab fails


I am not sure why there is not much information on this functionality but I am having problems with something I thought would be very easy. Following is what I want to do.

  • I have already loaded my tab control which has one of its tabs listing some items
  • Now, I am adding an item in the list using a completely different partial View and once it is loaded I want the tab flawlessly updated using AJAX.

I am using following code to TRY to reload the tab:

 var tabStrip = $("#tabstrip").kendoTabStrip();
                 var somethingelse =  tabstrip.data('kendoStrip');
                 var item = somethingelse.items()[1];
                tabStrip.reload(item);

When I put debugger on this what I figured is that $("#tabstrip") does get identified at the run time BUT both $("#tabstrip").kendoTabStrip(); and tabstrip.data('kendoStrip'); return unidentified and all the subsequent actions fail. What am I doing wrong here?


Solution

  • change your code like this

    var tabstrip = $("#tabstrip").kendoTabStrip();
                var kendoTabStrip = tabstrip.data().kendoTabStrip;
                var item = kendoTabStrip.items()[1];
                kendoTabStrip.reload(item);
                $("#Kendowindow").data("kendoWindow").close();
    

    reload documentation