Our pure JavaScript Scheduler component


Post by cooper »

Default schedule populates like this:

Image

I'd like to justify all events to the top, like in this mockup:

Image

Is that not done with the mergeCell property?

Thx


Post by tasnim »

Hi,

If I understood correctly, you can assign the event that resource you want by setting https://bryntum.com/products/scheduler/docs/api/Scheduler/model/EventModel#field-resourceId

Good Luck :),
Tasnim


Post by cooper »

*dbl post

Last edited by cooper on Fri Mar 22, 2024 4:50 pm, edited 1 time in total.

Post by cooper »

Hmmm, I think I see. It's tied to the resourceId value? When each event has it's own unique value, it displays like the top image. If I gave each event the same resourceId value, like "1", then it does start to look like what I'm after.


Post by ghulam.ghous »

That is the expected behaviour. Because events are organized according to the resources they are are assigned to. Yes they are tied to the resources (resourceId). https://bryntum.com/products/scheduler/docs/api/Scheduler/model/EventModel#field-resourceId


Post by cooper »

I'd thought each event needed it's own unique resourceId value as best practice, and that there was a UI setting to just get rid of all the individual grid cells so that the event tiles could justify to the top. Like some kind of version of "rowspan" property for a table.

Close enough.


Post by ghulam.ghous »

Hi Cooper,

Well scheduler does not work like that. Each row represent a resource and the events are assigned to them as per need. Let me show you a simple example - https://bryntum.com/products/scheduler/examples/timeresolution/. In this example, Arcady has a coding session event. Second resource, Dave, has a conference call at a given time. So this is how things work. You can explore our examples to get a better idea of Scheduler, read a small section here https://bryntum.com/products/scheduler/docs/guide/Scheduler/overview#how-does-it-work.


Post by Animal »

If you want to visualize your events as simple time-blocks covering a duration, probably check out the Calendar examples.

https://bryntum.com/products/calendar/examples/


Post by cooper »

I've already built everything in scheduler - it seems more appropriate for pretty much everything but the event display.

The only thing that isn't right is the order of the events shown on each day. Does scheduler use the event name or title values to decide the order they appear in when the resourceid value is the same for all entries? Is there an override for however it's deciding to order the events in each day column?


Post by marcio »

Hey cooper,

As Ghulam already mentioned, the Scheduler is displayed in a way that each row corresponds to a resource, and each event attached to each resource is displayed in its respective line. If you have an event assigned to multiple resources, it'll be displayed multiple times on each resource row.

You can test some ideas of possible layouts on our demo https://bryntum.com/products/scheduler/examples/layouts/ but the main principle of having a list of resources where each row will contain all the assigned events to that resource will prevail.

Best regards,
Márcio


Post Reply