Search
ListContainer.itemsChanging Event
See Also
 






Raised when the items collection is changing.

Namespace: MindFusion.Common.UI
File: ListContainer.js

 Syntax

JavaScript  Copy Code

EventDispatcher itemsChanging

 Event Data

The event handler method receives the following arguments:
sender
A ListContainer 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 code handles the itemsChanging event of a ListView object. The ListView class derives from ListContainer.

JavaScript  Copy Code

// create the ListView control
nodeList = new ui.ListView(document.getElementById("nodeList"));
nodeList.itemsChanging.addEventListener(itemsChangingEventHandler);


function itemsChangingEventHandler(sender, args)
{
 if(args.item.title == "Room A")
 {
      //cancel the change
      args.cancel = true;
 }
}

 See Also