Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > DataSet component > DataSet class | |||
Inheritance MovieClip > DataSet
ActionScript Class Name mx.data.components.DataSet
The DataSet component lets you work with data as collections of objects that can be indexed, sorted, searched, filtered, and modified.
The DataSet component functionality includes DataSetIterator, a set of methods for traversing and manipulating a data collection, and DeltaPacket, a set of interfaces and classes for working with updates to a data collection. In most cases, you don't use these classes and interfaces directly; you use them indirectly through methods provided by the DataSet class.
The following table lists the methods of the DataSet class.
|
Method |
Description |
|---|---|
|
Adds the specified item to the collection. |
|
|
Adds an item to the data set at the specified position. |
|
|
Creates a new sorted view of the items in the collection. |
|
|
Signals that the |
|
|
Indicates whether the collection has changes pending that have not yet been sent in a delta packet. |
|
|
Clears all items from the current view of the collection. |
|
|
Returns a newly initialized collection item. |
|
|
Stops sending DataSet events to listeners. |
|
|
Resumes sending DataSet events to listeners. |
|
|
Locates an item in the current view of the collection. |
|
|
Locates the first occurrence of an item in the current view of the collection. |
|
|
Locates the last occurrence of an item in the current view of the collection. |
|
|
Moves to the first item in the current view of the collection. |
|
|
Returns the unique ID for the specified item. |
|
|
Returns a clone of the current iterator. |
|
|
Returns the number of items in the data set. |
|
|
Indicates whether the current iterator is at the end of its view of the collection. |
|
|
Indicates whether the current iterator is at the beginning of its view of the collection. |
|
|
Indicates whether the specified sort exists. |
|
|
Indicates whether the collection contains any items. |
|
|
Moves to the last item in the current view of the collection. |
|
|
Loads all of the relevant data needed to restore the DataSet collection from a shared object. |
|
|
Moves the current iterator to the item with the specified ID. |
|
|
Moves to the next item in the current view of the collection. |
|
|
Moves to the previous item in the current view of the collection. |
|
|
Removes all the items from the collection. |
|
|
Removes the specified item from the collection. |
|
|
Removes a data set item at a specified position. |
|
|
Removes the current iterator's range settings. |
|
|
Removes the specified sort from the DataSet object. |
|
|
Saves the data in the DataSet object to a shared object. |
|
|
Sets the current iterator for the DataSet object. |
|
|
Sets the current iterator's range settings. |
|
|
Moves forward or backward by a specified number of items in the current view of the collection. |
|
|
Makes the specified sort the active one. |
The following table lists the properties of the DataSet class.
|
Property |
Description |
|---|---|
|
Returns the current item in the collection. |
|
|
Returns the data provider. |
|
|
Returns changes made to the collection, or assigns changes to be made to the collection. |
|
|
Indicates whether items are filtered. |
|
|
User-defined function for filtering items in the collection. |
|
|
Items in the collection. |
|
|
Name of the object to create when assigning items. |
|
|
Specifies the number of items in the current view of the collection. |
|
|
Indicates whether changes made to the collection, or its items, are recorded. |
|
|
Contains the properties (fields) for any transfer object in this collection. |
|
|
Indicates whether the collection can be modified. |
|
|
Specifies the collection's schema in XML format. |
|
|
Contains the current item's index in the collection. |
The following table lists the events of the DataSet class.
|
Event |
Description |
|---|---|
|
Broadcast before an item is added to the collection. |
|
|
Broadcast after the |
|
|
Broadcast when calculated fields should be updated. |
|
|
Broadcast when the DataSet object's delta packet has been changed and is ready to be used. |
|
|
Broadcast when the iterator's position is changed. |
|
|
Broadcast when items in the collection have been modified in some way. |
|
|
Broadcast when a new transfer object is constructed by the DataSet object, but before it is added to the collection. |
|
|
Broadcast before an item is removed. |
|
|
Broadcast when a delta packet is assigned to the DataSet object that contains messages. |
Flash CS3