User Guide
334 Chapter 6: Components Dictionary
DataSet.modelChanged
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Description
on(modelChanged) {
// insert your code here
}
listenerObject = new Object();
listenerObject.modelChanged = function (eventObj) {
// insert your code here
}
dataSet.addEventListener("modelChanged", listenerObject)
Description
Event; broadcast when the collection changes in some way—for example, when items are
removed or added to the collection, when the value of an item’s property changes, or when the
collection is filtered or sorted.
The event object (
eventObj) contains the following properties:
target The DataSet object that generated the event.
type The string "iteratorScrolled".
firstItem The index (number) of the first item in the collection that was affected by
the change.
lastItem The index (number) of the last item in the collection that was affected by the change
(equals
firstItem if only one item was affected).
fieldName A string that contains the name of the field being affected. This property is
undefined unless the change was made to a property of the DataSet object.
eventName A string that describes the change that took place. This can be one of the
following values:
String value Description
"addItems"
A series of items has been added.
"filterModel"
The model has been filtered, and the view needs refreshing (reset scroll position).
"removeItems"
A series of items has been deleted.
"schemaLoaded"
The fields definition of the data provider has been declared.
"sort"
The data has been sorted.
"updateAll"
The entire view needs refreshing, excluding scroll position.
"updateColumn"
An entire field’s definition in the data provider needs refreshing.