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

Trying to reload a specific tab by name or text

1 Answer 106 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
AilWeb
Top achievements
Rank 1
AilWeb asked on 06 Sep 2012, 02:19 PM
How can I get a reference to a specifc tab on a tabstrip and tell it to reload itself?
I have a tabstrip with a few tabs added, and each has a "Text" property defined.
How can I find a specific tab, given the text to look for, and then tell that tab to reload itself?

Actually, what I need to do is simply reload the current tab.
Iv'e see similar questions, but no answers that were much use.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Sep 2012, 12:01 PM
Hello,

If you just need to reload the current tab you can look for an item with the class "t-state-active" and call the 
reload method e.g.

var tabStrip = $("#TabStrip").data("tTabStrip");
var item =$(tabStrip.element).find("> .t-tabstrip-items .t-state-active");
tabStrip.reload(item);
Finding the item by text is also possible by searching for an item which contains the text:
var tabStrip = $("#TabStrip").data("tTabStrip");
var item = $(tabStrip.element).find("> .t-tabstrip-items .t-item:contains(" + mytext + ")");
tabStrip.reload(item);
Regards,
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
TabStrip
Asked by
AilWeb
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or