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

Refresh Tab With Different ContentUrl

2 Answers 1266 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 20 Dec 2017, 07:30 PM

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 Answers, 1 is accepted

Sort by
0
Eric
Top achievements
Rank 1
answered on 20 Dec 2017, 07:32 PM

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);
0
Neli
Telerik team
answered on 22 Dec 2017, 11:39 AM
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.
Tags
TabStrip
Asked by
Eric
Top achievements
Rank 1
Answers by
Eric
Top achievements
Rank 1
Neli
Telerik team
Share this question
or