ASP.NET Pack Programmer's Guide
NotifyCollectionChangingEventArgs.action Property
See Also
 





Gets the action that caused the event.

Namespace: MindFusion.Mapping
Package: Events.js

 Syntax

JavaScript  Copy Code

Object.defineProperty(NotifyCollectionChangingEventArgs.prototype, "action", { value: NotifyCollectionChangedAction });

 Property Value

NotifyCollectionChangedAction. The action that caused the event.

 Example

The following code handles the collectionChanging event of the decorations property of a DecorationLayer object.

JavaScript  Copy Code

var m = MindFusion.Mapping;

var markers = new m.DecorationLayer("Images");

...................
//add some Marker-s to the decorations property
......................

markers.decorations.collectionChanging.addEventListener(handleCollectionChanging);


function (handleCollectionChanging) (sender, args )
{
     if(args.action == m.NotifyCollectionChangedAction.Add)
     {
          args.cancel = true;
     }
}

 See Also

NotifyCollectionChangingEventArgs Members
NotifyCollectionChangingEventArgs Class
MindFusion.Mapping Namespace