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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -