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

Two DayPilotScheduler on one form ... data binding doesn't work

Asked by Anonymous
8 years ago.

Hi all,

I am using Version 6.6.2359 (Trial). I have two schedulers on my form (one showing rooms as resources the other one trainers). When I am moving an event in the rooms scheduler, the trainer scheduler never shows the updated data. I am updating the data for both schedulers like this:

protected void roomScheduler_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
{
CourseManager.MoveCourse(new Guid(e.Value), new Guid(e.NewResource), e.NewStart);
BindSchedules();
}

private void BindSchedules( )
{
DataSet dsRoom = CourseManager.GetRoomSchedule( );

roomScheduler.DataSource = dsRoom.Tables["CourseInfo"];
roomScheduler.DataBind();
roomScheduler.Update();

DataSet dsTrainer = CourseManager.GetTrainerSchedule();
trainerScheduler.DataSource = dsTrainer .Tables["CourseInfo"];
trainerScheduler.DataBind();
trainerScheduler.Update();
}

Am I missing something?

Thanks for your help!

Comment posted by Anonymous
8 years ago.

Hi all,

I figured out a workaround to fix this bug.

1. I added a command event for the trainer scheduler. In the event I re-bind the trainer scheduler.

2. I switched the Event Handling for moving events from CallBack to JavaScript in the room scheduler.

3. I set the EventMoveJavaScript property of the room scheduler to
EventMoveJavaScript="dps1.eventMoveCallBack(e, newStart, newEnd, newResource);dps2.commandCallBack('refresh');"

Now both schedulers will be updated.

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