Search
ListContainer.selectionChanging Event
See Also
 






Raised when the selection collection is changing.

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

 Syntax

JavaScript  Copy Code

EventDispatcher selectionChanging

 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 creates a ListView, which derives from ListContainer and handles its selectionChanging event:

JavaScript  Copy Code

var listView = new ui.ListView(document.getElementById("listView"));
listView.selectionChanging.addEventListener(listSelectionChanging);

function listSelectionChanging(sender, args)
{
 if (args.oldItems.contains(item1))
 {
   args.cancel = true;
  }
 }

 See Also