Answer posted by Dan Letecky [DayPilot] 8 years ago.
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();
}
Comment posted by Stratus 8 years ago.
hi this is nice to reorder all of them , but i wanna be able to drag an drop for example 5 resources on the top of the list as we do with one , is that possible ?
Comment posted by Dan Letecky [DayPilot] 8 years ago.
Yes, just modify dp.resources as needed and call update().
Answer posted by Stratus 8 years ago.
oki ty !
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.