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

Scheduler - New Event Placement Strategy

Asked by Anonymous
1 year ago.

Hi,

I have a use case, where I have to specify the line that the event should be displayed at, depending on its type. E. g. all events of type A should be placed at line 0, all events of type B at line 1 etc.

If there are many events of the same type inside the same resource, the default sorting rule (start asc, end desc) applies.

Right now I have to do this placement myself, which is not that trivial and it gets complicated, because I have to take in account all events opertions: adding, deleting, showing, hiding, moving, resizing and copy&paste

Otherwise it would be helpful, if you could provide me with a workaround.

Thank you!

Answer posted by Dan Letecky [DayPilot]
1 year ago.

You might want to take a look at the "split resources" feature:
https://doc.daypilot.org/scheduler/split-resources/

It lets you split a resource into multiple subresources, each having a special row in the Scheduler grid. You can use the split resources to replace the fixed line numbers. Concurrent events will be placed automatically using the default sort order.

Normally, each subresource would have its own title in the row header section but it can be hidden ("split: false").

Comment posted by Anonymous
1 year ago.

Can I let the subresources without any events be hidden automatically? And can I show them, once I add an event to a hidden subresource?

Comment posted by Dan Letecky [DayPilot]
1 year ago.

Yes, please take a look at this tutorial:
https://code.daypilot.org/97960/html5-scheduler-hiding-rows-without-events

The Scheduler can hide rows that meet certain criteria. This example hides rows that have no events. You can combine it with other rules if needed.

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