As can be seen from below, the resources and events are not aligned correctly.
Hi Alex,
Greetings from Syncfusion Support.
We suspect that you might be customizing the scheduler work cells height. By default scheduler, it has been working fine. So could you please share all the customization-related changes with us to provide a prompt solution as soon as possible?
Regards,
Vengatesh
Hi,
We're using
<SfSchedule @ref="sfSchedule" EventSettings="ScheduleEventSettings" StartHour="@StartWorkingHours" EndHour="@EndWorkingHours"
TValue="Reservation" Width="100%" Height="90vh" @bind-SelectedDate="@tenantReservationService.CurrentDate" WorkDays="WorkingDays" CurrentView="View.TimelineDay" DateFormat="dddd MMM dd, yyyy" ShowHeaderBar="false" CssClass="schedule-cell-dimension">
<style>
.schedule-cell-dimension.e-schedule .e-timeline-view .e-date-header-wrap table col,
.schedule-cell-dimension.e-schedule .e-timeline-view .e-content-wrap table col,
.schedule-cell-dimension.e-schedule .e-timeline-month-view .e-date-header-wrap table col,
.schedule-cell-dimension.e-schedule .e-timeline-month-view .e-content-wrap table col {
width: auto !important;
}
.e-schedule .e-timeline-view .e-date-header-wrap, .e-schedule .e-timeline-month-view .e-date-header-wrap {
font-size: 10px;
}
</style>
Hi,
Our code is shown below.
<SfSchedule @ref="sfSchedule" StartHour="@StartWorkingHours" EndHour="@EndWorkingHours"
TValue="Reservation" Width="100%" Height="90vh" @bind-SelectedDate="@tenantReservationService.CurrentDate" WorkDays="WorkingDays" CurrentView="View.TimelineDay"
DateFormat="dddd MMM dd, yyyy" ShowHeaderBar="false" CssClass="schedule-cell-dimension">
<ScheduleGroup EnableCompactView="false" AllowGroupEdit="true" Resources="@Resources"></ScheduleGroup>
<ScheduleResources>
<ScheduleResource TItem="Section" TValue="int" DataSource="Sections" Field="SectionIds" Name="Sections" Title="Sections" TextField="Name" IdField="Id" ColorField="Color" AllowMultiple="false"></ScheduleResource>
<ScheduleResource TItem="Table" TValue="int[]" DataSource="@Tables" Field="TableIds" Name="Tables" Title="Tables" TextField="Title" IdField="Id" ColorField="Color" GroupIDField="SectionId" AllowMultiple="true"></ScheduleResource>
</ScheduleResources>
<ScheduleEvents Created="ScheduleCreated" @ref="sfEvents" OnDragStart="e => OnDragStart(e)" OnEventClick="OnEventClick"
TValue="Reservation" OnCellClick="e => OnCellClick(e)" Resized="e => OnEventResized(e)" Dragged="e => OnEventDragged(e)"></ScheduleEvents>
<ScheduleWorkHours Highlight="true" Start="@StartWorkingHours" End="@EndWorkingHours"></ScheduleWorkHours>
<ScheduleEventSettings @ref="ScheduleEventSettings" DataSource="@reservations"></ScheduleEventSettings>
<ScheduleTimeScale Interval="60" SlotCount="slotCount"></ScheduleTimeScale>
<ScheduleViews>
<ScheduleView Option="View.TimelineDay" AllowVirtualScrolling="true">
<EventTemplate>
@{
var res = (context as Reservation);
<div class='template-wrap'>
<div class='subject @GetAllergensColur(res.Dietaries.Count) @res.Class @(res.Online? "online-booking" : string.Empty)' style='background: @GetReservationColour(res.ReservationStatus)'>
@(res.Guests) Guests @(res.Name)
@(res.StartTime.ToString("h:mm tt")) - @(res.EndTime.ToString("h:mm tt"))
@if (!string.IsNullOrEmpty(res.Notes))
{
<i class="oi oi-comment-square"></i>
}
@if (res.Dietaries.Count > 0)
{
<i class="oi oi-warning"></i>
}
</div>
</div>
}
</EventTemplate>
</ScheduleView>
</ScheduleViews>
</SfSchedule>
Hi Alex,
Thanks for the update.
We have prepared a sample based on your shared query “Misalignment between the scheduler work cells and the resource cells” at our end, but unfortunately, we were unable to reproduce your reported problem and the sample can be downloaded from the attached link. We have tried the following ways to replicate the issue at our end.
|
<style> .schedule-cell-dimension.e-schedule .e-timeline-view .e-resource-cells, .schedule-cell-dimension.e-schedule .e-timeline-month-view .e-resource-cells { height: 50px; } .schedule-cell-dimension.e-schedule .e-timeline-view .e-work-cells, .schedule-cell-dimension.e-schedule .e-timeline-month-view .e-work-cells { height: 50px; } </style> |
Kindly try the above solution and if the issue persists still share the below details to validate your reported issue and serve you better.
We will be happy to assist you..!
Regards,
Hareesh