Sorting an Observable Array in Knockout
KnockoutJS observable arrays offer a sort function, this makes it relatively easy to sort a databound array in your UI (regardless of the natural order of the data.) data-bind=”foreach: items.sort(function (l, r) { return l.lastName() > r.lastName() ? 1 : -1 })” You should not have to pre-sort/re-sort your source data, if you’re sorting before … Read more