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

Moving all events from once resource to another

Asked by mortin
6 years ago.

Hi,

Is it possible move all events from once resource to another.I am using javascript.By using context menu to copy all events of the resource.

Thanks in advance

Answer posted by Dan Letecky [DayPilot]
6 years ago.

You can get a list of all events for a given row using DayPilot.Row.events.all():

var events = dp.rows.find("A").events.all();

Then change the "resource" value for all of them and call update:

events.forEach(function(e) {
  e.data.resource = "B";
  dp.events.update(e);
});
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.