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

Change Back Color on Event Move

Asked by Vinay K
5 years ago.

Hi,
I have a problem with changing the background color of the event. I have set it in the Before Event Render but when i do an Event Move i need to change the background color again. I am able to update the Scheduler event but the color doesn't change because the Before Event Render event doesn't fire again. How can i fire the event again when i execute Event Move?

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

Most likely, the problem is that you are using EventMoveHandling="Notify". When using the Notify event handling mode the events are not reloaded from the server side unless you call DayPilotScheduler.Update() in EventMove handler.

See also:
https://doc.daypilot.org/scheduler/notify-event-model/

Comment posted by Vinay K
5 years ago.

Dan,
I do have the EventMoveHandling set to Notify. I am calling the DayPilotScheduler.Update() in the EventMove handler. Do i have to do anything else ? Or should i change the Notify to Callback ?

Comment posted by Dan Letecky [DayPilot]
5 years ago.

Vinay,

Yes, you can also change it to CallBack but it should work with Notify as well. In order to reload the events you need to set DataSource (reload the data from a database) and call DataBind() and Update(). This will ensure that BeforeEventRender is fired and the new event data set is set to the client side.

Let me know if it doesn't work as expected.

Comment posted by Vinay K
5 years ago.

It worked i had to change DayPilotScheduler.Update() to DayPilotScheduler.Update(CallBackEventType.EventsOnly)

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