- Home
- Forum
- JavaScript - EJ 2
- Resources don't line up with tasks
Resources don't line up with tasks
I implemented a "resourceHeaderTemplate" and when the Schedule renders, the resources do not line up with their tasks. "rowAutoHeight" is true (which is what we want). How can I fix this?
Note: "rowAutoHeight" is false, they also don't line up well.
Hi Brian,
Sample: https://stackblitz.com/edit/jthc9o-pk5tiv?file=index.js,index.html
Demo: https://ej2.syncfusion.com/javascript/demos/#/material/schedule/cell-dimension.html
You can resolve your issue by increasing the cell
height of the Schedule by overriding the default Schedule styles. Refer to the
shared demo and UG links to customize the Schedule cells. Let us know if you
need any further assistance.
Output screenshot:
Regards,
Venkatesh
With your example, all rows have to be the same height, right? That could be a solution to this issue, but then in some rows you'll have a bunch of white space (under the tasks or if there are no tasks), while other rows will "+1 more", "+2 more", etc. This is not the solution we're looking for. We want every row to be the height needed to show all of the tasks for each resource...not more, not less. Is this possible?
Also...we're using/setting "resourceHeaderTemplate" and "eventTemplate" so our Resources and Tasks have custom layouts. Can the Schedule be smart enough to determine the height of the Resource area (it will vary resource to resource) and the height of his/her Tasks (it will vary resource to resource) and make their height equals. This will vary row to row. Or...can I add code to "rendercell" and on each row detect/determine the heights and set them programatically?
Hi Brian,
Sample: https://stackblitz.com/edit/jthc9o-piwmuk?file=index.js,index.html
Based on your requirements, we have modified the sample by setting the height
for both work cells and resource cells of the scheduler as shown in the
highlighted code snippet below. By enabling the RowAutoHeight
property, each row will show all the tasks for each resource. By doing this,
when the workcell height increases, the resource cell height will also increase
based on the work cell height. You can refer to the shared sample. Let us know
if you need any further assistance.
|
<style> .schedule-cell-dimension.e-schedule .e-timeline-view .e-work-cells, .schedule-cell-dimension.e-schedule .e-timeline-month-view .e-work-cells, .e-schedule .e-timeline-view .e-resource-cells, .e-schedule .e-timeline-month-view .e-resource-cells { height: 100px; } </style>
|
Regards,
Venkatesh
Thanks for the updates, but your example does not dynamically auto-size the resource area and tasks area depending on the amount of content. I changed your example to show more designations under the resource...notice the tasks don't line up anymore. Setting the height via CSS will not work. Any other ideas or is this not possible with SyncFusion Schedule? Thanks!
Brian,
According to the current Scheduler
architecture, there is no built-in option to resize resource cells based on
their work cells size. You can maintain the static maximum template height for
resource cells as we mentioned in earlier update. We have already logged a
feature request for this, and the feature will be included in one of our
upcoming releases. You can track the status by using the link provided below.
Feedback: https://www.syncfusion.com/feedback/9828/auto-row-height-support-for-resource-column
Regards,
Venkatesh
- 6 Replies
- 2 Participants
-
BP Brian Pautsch
- Jun 22, 2023 09:06 PM UTC
- Jun 28, 2023 02:08 PM UTC