User Guide
DataSet.removeAll() 393
Example
The following example makes the DataSet object named my_ds read-only, and then attempts
to change the value of a property that belongs to the current item in the collection. This
attempt throws a
DataSetError exception.
import mx.data.components.datasetclasses.DataSetError;
my_ds.readOnly = true;
try {
// This throws an exception.
my_ds.addItem({name:'Joe'});
} catch (e:DataSetError) {
// Sort specified 'name' doesn’t exist for DataSet 'my_ds'.
trace("DataSetError >> " + e.message);
}
See also
DataSet.currentItem
DataSet.removeAll()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.removeAll()
Returns
Nothing.
Description
Method; removes all items in the DataSet collection.
Example
The following example removes all the items in the DataSet collection contact_ds:
contact_ds.removeAll();