User Guide
350 Components Dictionary
Example
The following code enables a Save Changes button (not shown) if the DataSet collection, or
any items with that collection, have had modifications made to them that haven’t been
committed to a delta packet.
my_ds.addItem({name:"Milton", years:3});
my_ds.addItem({name:"Mark", years:3});
my_ds.addItem({name:"Sarah", years:1});
my_ds.addItem({name:"Michael", years:2});
my_ds.addItem({name:"Frank", years:2});
my_ds.addEventListener("modelChanged", modelChangedListener);
function modelChangedListener(evt_obj:Object):Void {
if (evt_obj.target.changesPending()) {
trace("changes pending");
submitChanges_button.enabled = true;
}
}
submitChanges_button.enabled = false;
my_ds.addItem({name:"Hal", years:4});
DataSet.clear()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.clear()
Returns
Nothing.
Description
Method; removes the items in the current view of the collection. Which items are considered
“viewable” depends on any current filter and range settings on the current iterator. Therefore,
calling this method might not clear all of the items in the collection. To clear all of the items
in the collection regardless of the current iterator’s view, use
DataSet.removeAll().
If
DataSet.logChanges is set to true when you invoke this method, “remove” entries are
added to
DataSet.deltaPacket for all items in the collection.