Search
Schedule.itemsChanging Event
See Also
 






Raised when the items collection of the Schedule is changing.

Namespace: MindFusion.Scheduling
File: Schedule.js

 Syntax

JavaScript  Copy Code

EventDispatcher itemsChanging

 Event Data

The event handler method receives the following arguments:
sender
A Schedule instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
A NotifyCollectionChangingEventArgs 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 itemsChanging event of a calendar schedule. In the handler method we check if the count of items in the calendar is more than 30 and if yes, we cancel the action.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - the collection of schedule items is being changed.
calendar.schedule.itemsChanging.addEventListener(handleItemsChanging);

function handleItemsChanging(sender, args) {
        if(calendar.schedule.items.count () > 30)
        {
            args.cancel = true;
        }
     
}

 See Also