Is it possible to prevent the user dragging an event to a resource if that resource already has an event for any part of the time of that event?
So given this situation we should not be able to move the event (2 Guests Jim) to the resource (for the times shown) that already has an event (2 Guests Bob).
You can prevent the appointments from being added on the resource has same date range by using the IsSlotAvailable method in the OnActionBegin, as shown in the below snippet.
<SfSchedule @ref="ScheduleRef" TValue="AppointmentData" Height="550px" @bind-SelectedDate="@CurrentDate">
<ScheduleEvents TValue="AppointmentData" OnActionBegin="OnActionBegin"></ScheduleEvents>
public async Task OnActionBegin(ActionEventArgs<AppointmentData> args)
bool availability = true;
if (args.ActionType == ActionType.EventChange)
var records = args.AddedRecords ?? args.ChangedRecords;
if (records == null)
availability = await ScheduleRef.IsSlotAvailableAsync(records.First());
args.Cancel = !availability;
Thanks will take a look
You are welcome. Let us know if you need any further assistance on this.