I am using a WinJS.Binding.List which puts my items into groups and then sorts the group using the groupsorting function:
function groupKeySelector(projectItem) { return projectItem.subgroup; },
function groupDataSelector(projectItem) { return currentProject.subgroups[projectItem.subgroup]; },
function groupSorter(first, second) {
if (first === second) {
return 0;
} else if (currentProject.subgroups[first].pos < currentProject.subgroups[second].pos) {
return -1;
} else {
return 1;
};
});
The users can easily update the column order in the app but what I am looking for is an easy way to notify the list to re-order its groups, the only way I can find is to re-call the whole function.