search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Move Resoources

Asked by Stratus
4 years ago.

hello is it possible to move resources with javascript besides the drag n drop for one resource ?

Answer posted by Dan Letecky [DayPilot]
4 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 = [ /* ... */ ];
// ...

function sortResourcesAlphabetically() {
  dp.resources.sort(function(a, b) {
    var resA =;
    var resB =;
    if (resA < resB) {
      return -1;
    if (resA > resB) {
      return 1;
    return 0;
Comment posted by Stratus
4 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]
4 years ago.

Yes, just modify dp.resources as needed and call update().

Answer posted by Stratus
4 years ago.

oki ty !

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.