Dynamically changing the color of all events


I would like for the user to be able to switch between two color schemes for all events loaded on the scheduler.

The first color scheme choice loads colors specifc to a certain section in the timeline view.

For this I am using the CSS class approach outlined here to give each section a CSS class: docs.dhtmlx.com/scheduler/sample … vents.html

This is working really well… however I also want to allow the user to choose to view the color associated with each individual event. I am supply a color and background color in the event object of each event.

How can I re-render all of the events to use their color properties and override the CSS class? I also need to be able to reverse this and return to the CSS class on demand.

Thanks for any assistance you can provide.

could you clarify how you :

Hi Serge,

I am loading the extra color information in the event object.

So an event looks something like this:

{ "id": "7", "text": "Test Something", "start_date": "2014-08-31T19:45:00.000Z", "end_date": "2014-09-05T06:20:00.000Z", "section_id": [ "4", "6" ], "notes": "A note here", "bg_color": "#3c78d8", "txt_color": "#000", "_timed": false }

Does this make sense?