Kendo ui 如何在追加后按字母顺序排序

Kendo ui 如何在追加后按字母顺序排序,kendo-ui,jquery-ui-sortable,kendo-tabstrip,kendo-ui-grid,Kendo Ui,Jquery Ui Sortable,Kendo Tabstrip,Kendo Ui Grid,这是我的密码 var tabStrip = $("#createPackageRoomType ul").kendoTabStrip().data("kendoTabStrip"); tabStrip.append({ text: $(this).attr('label'), content: $('#createPackageRoomTaskList').val() }); tabStrip.select((tabStrip.tabGroup.children("li").length -

这是我的密码

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')+'\");');
使用此功能:

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);
    });
}
剑道示例: