hi all:
i hava some question
1.how How to determine tabs exist TabStrip,if exist select it,else create a new tabs?
2.as extjs,allow close a tabs show a 'x' close button?
please help me ,thanks
2 Answers, 1 is accepted
0
Dimiter Madjarov
Telerik team
answered on 27 Mar 2013, 04:11 PM
Hi Seaman,
If you would like to check if some specific tab exists, you could assign a unique id to the tabs and perform the check with jQuery.
E.g.
function removeOrAdd(){
var tabstrip = $("#tabstrip").data("kendoTabStrip");
if($("#item1").length){
tabstrip.remove($("#item1"));
} else {
tabstrip.append(
{
text: "New Item",
content: "content"
});
}
}
You could take a look at the following JS Bin example which demonstrates this.
Regarding your second question if you are referring to removing the tab from the widget, you could use some custom button in the TabStrip markup, and call the remove method on click.
Regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!