Dragging recurring event = e.DataAction.ActionType INSERTED

Using 3.0 and dragging a recurring event to a new date on the calendar results in an ActionType of ActionType.Inserted vice Updated. This causes a key violation in the database since it tries to insert another record. Also,

scheduler.attachEvent("onBeforeDrag", function (id) {
    if (scheduler.getEvent(id).rec_type) return false;
    return true;
});

scheduler.getEvent(id).rec_type returns a NULL value event though the db contains a value, which prevents disabling the drag event for recurring events.

Any suggestions?

When you are dragging the instance of recurring event, you are not changing all events in serie, but alter this one instance. For example if you have some event as “each monday at 5 PM”, and dragging one instance to 6pm it will be “each monday at 5 PM except of a single event which starts at 6PM” - the server side code will need to insert new record for such exception - that is why you have Insert action at the server side.

as for drag preventing, try to use

scheduler.attachEvent("onBeforeDrag", function (id) { if (id.toString().indexOf("#") != -1) return false; return true; });

It will prevent dragging of recurring events

Thank you for the explanation and code sample.
Great product and support.

This works, Thanks.

scheduler.attachEvent(“onBeforeDrag”, function (id) {
if (id.toString().indexOf("#") != -1) return false;
return true;
});

One minor change, need to check for null ID or throws exception when adding new event:

scheduler.attachEvent("onBeforeDrag", function (id) {
   [b] if (id == null) return true;[/b]
    if (id.toString().indexOf("#") != -1) return false;
    return true;
});