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);
});