kendo ui - How to sort alphabetically kendotabStrip after append -


this 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')+'\");'); 

use 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


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -