I'm unable to add html to the tab text. It outputs the html code.
var tabHeader = value["AddressTypeDescription"];
var tab = $('<div>').attr('name', tabHeader);
$(tabpanel.contentHolder(0)).children().clone().appendTo(tab);
var vm = kendo.observable(value);
kendo.bind(tab, vm);
//Need to do this otherwise the input values will not get passed
tab.children().find('input').each(function () { $(this).attr('value', this.value);})
//renders html code
var closeButton = "<span unselectable='on' class='k-icon k-delete'>delete</span>";
tabpanel.insertAfter({
text: tabHeader+' '+ closeButton,
content: tab.html()
}
, tabpanel.tabGroup.children(":nth-last-child(2)")
);
This is the output:
Company <span unselectable='on' class='k-icon k-delete'>delete</span>