You can also move a resource by modifying the "resources" array. Afer making the changes, call update() to refresh the Scheduler.
This example sorts the rows alphabetically (by name):
var dp = new DayPilot.Scheduler("dp");
dp.resources = [ /* ... */ ];
// ...
dp.init();
function sortResourcesAlphabetically() {
dp.resources.sort(function(a, b) {
var resA = a.name.toLowerCase();
var resB = b.name.toLowerCase();
if (resA < resB) {
return -1;
}
if (resA > resB) {
return 1;
}
return 0;
});
dp.update();
}