Refresh Tab With Different ContentUrl

3 posts, 0 answers
  1. Eric
    Eric avatar
    2 posts
    Member since:
    May 2017

    Posted 20 Dec 2017 Link to this post

    Trying to refresh a tab on the TabStrip with a different URL.  The below code use to work but doesn't anymore since upgrading to the most resent 2017.3.1026 release.

    var refreshUrl = '@Url.Action("TabContent", "Home")/' + param;
     
     var tabstrip = $("#lobbyTabStrip").data("kendoTabStrip");
     var tab = tabstrip.select();
     
    $($('#tabStrip').find('a.k-link')[tab.index()]).data('contentUrl', refreshUrl);
     tabstrip.reload(tab);

     

    The URL isn't being updated,  same url as before is being updated.  What do I need to do to make this work again.

  2. Eric
    Eric avatar
    2 posts
    Member since:
    May 2017

    Posted 20 Dec 2017 in reply to Eric Link to this post

    Ignore the obvious naming errors in the code sample. Corrected

     

    var refreshUrl = '@Url.Action("TabContent", "Home")/' + param;
      
     var tabstrip = $("#lobbyTabStrip").data("kendoTabStrip");
     var tab = tabstrip.select();
      
    $($('#lobbyTabStrip').find('a.k-link')[tab.index()]).data('contentUrl', refreshUrl);
     tabstrip.reload(tab);
  3. Neli
    Admin
    Neli avatar
    208 posts

    Posted 22 Dec 2017 Link to this post

    Hi Eric,

    I have already sent a reply in the support ticket, that you opened on the same subject.
    For convenience I will paste my reply here as well. I would suggest we keep the conversation in only one thread. 

    Could you please try to change the selector in the find method. The 'k-link' class is part of a <span> element (screencast here). 
    I have tested with latest version and selector as follows and the selected tab is reloaded correctly:

    $($('#tabstrip').find('span.k-link')[tab.index()]).data('contentUrl', refreshUrl);

    I hope this information will be helpful.

    Regards,
    Neli
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top