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

How switch between line = 0 and line = 'dedicated' in a Event?

Asked by Anonymous
9 days ago.

Hello good day!

By default i like show the events in a single line (line=0), but for more details i like switch to 'dedicated' o 'default' why there are events in the same range. Is possible?

since it accepts integer variable and string, I don't know how to do it
I try var mode = '0', and swith to 'default', but '0' is an unaccepted value

Im sorry by my English

Greetings from Mexico

Answer posted by Dan Letecky [DayPilot]
9 days ago.

The "line" property can't be changed in onBeforeEventRender (that's too late). You need to set it in the data source before the Scheduler loads it.

You can preprocess the data like this:

const events = [ /* ... */ ];
events.forEach(e => e.line = 0);  // or events.forEach(e => e.line = "dedicated");

If you use a number it will use the specified line within a row. If you use "dedicated" it will use a special line for each event and if you use null or undefined it will have the default behavior.

Comment posted by Ivan Estrada
8 days ago.

"You need to set it in the data source before the Scheduler loads it." Yes, I understand, that's why I was reloaded the data every time I tried to change my mode.

But with your solution it is no longer necessary reload data, just go loopthe same arrayto and change the property.

Thank very much!!!!

Greetings !!!

New Reply
This reply is
Your name (optional):