0

This is my code

var tabStrip = $("#createPackageRoomType ul").kendoTabStrip().data("kendoTabStrip");

tabStrip.append({ text: $(this).attr('label'), content: $('#createPackageRoomTaskList').val() });
tabStrip.select((tabStrip.tabGroup.children("li").length - 1));
tabStrip.tabGroup.children("li.k-state-active").attr("id",$(this).attr('label')+"_"+$(this).attr('value'));
tabStrip.tabGroup.children("li.k-state-active").attr("value",$(this).attr('value'));
tabStrip.tabGroup.children("li.k-state-active").attr("label",$(this).attr('label'));"checkedCheckbox(\"'$(this).attr('value')'\")"
tabStrip.tabGroup.children("li.k-state-active").attr("onclick",'checkedCheckbox(\"'+$(this).attr('value')+'\");');
ezanker
  • 24,628
  • 1
  • 20
  • 35

1 Answers1

0

Use this function:

function sortTabs(tabStripId){
    var tabstrip = $("#" + tabStripId).data("kendoTabStrip");
    tabstrip.tabGroup.children().sort(function(a, b){
          return $(a).find('.k-link').text() > $(b).find('.k-link').text() ? 1 : -1;
    }).each(function(ind, val){
        tabstrip.tabGroup.append(val);
    });
}

Kendo dojo example: http://dojo.telerik.com/udaNe

Jarosław Kończak
  • 3,387
  • 2
  • 19
  • 36