Search
Calendar.recurringItemDeleting Event
See Also
 






Raised while a recurring item is being deleted.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

EventDispatcher recurringItemDeleting

 Event Data

The event handler method receives the following arguments:
sender
A Calendar instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
An ItemModifyingEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following example attaches a handler to the recurringItemDeleting event of a calendar. In the handler method we check if the name of the resource associated with this recurring item is "Prof. Bradley". If yes, we cancel the action e.g. the user was not able to delete this recurring event.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - when a recurring calendar item is being deleted.
calendar.recurringItemDeleting.addEventListener(handleRecurringItemDeleting);

function handleRecurringItemDeleting(sender, args) {
    /* the args.item argument gives information about
     * the recurring item that was being deleted */
     if(args.item.resource.name == "Prof. Bradley")
          {
              args.cancel = true;
          }
     
}

 See Also