Hi sande,
The cleanest approach is to allow the drag interaction but reject the resource change in a single validation point—appointmentChange. jqxScheduler exposes this event after an appointment is modified, so you can compare the original and target resource and immediately revert unauthorized moves. This avoids expensive DOM checks during every drag frame and scales much better with larger datasets.
app.unpkg.com
+1
A typical implementation looks like this:
$('#scheduler').on('appointmentChange', function (event) {
const appointment = event.args.appointment;
const originalResource = appointment.originalResourceId;
const targetResource = appointment.resourceId;
if (!canMoveToResource(currentUser, targetResource)) {
$('#scheduler').jqxScheduler(
'setAppointmentProperty',
appointment.id,
'resourceId',
originalResource
);
}
});
Regards,
Peter