User Guide

DataProvider API 291
Property summary for the DataProvider API
The following table lists the properties of the DataProvider API.
Event summary for the DataProvider API
The following table lists the events of the DataProvider API.
DataProvider.addItem()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myDP.addItem(item)
Parameters
item
An object that contains data. This constitutes an item in a data provider.
Returns
Nothing.
Description
Method; adds a new item at the end of the data provider. This method triggers the modelChanged
event with the event name
addItems.
Example
The following example adds an item to the end of the data provider myDP:
myDP.addItem({label : "this is an Item"});
DataProvider.sortItems() Sorts the items in the data provider according to a compare
function or sort options.
DataProvider.sortItemsBy() Sorts the items in the data provider alphabetically or numerically,
in the specified order, using the specified field name.
Property Description
DataProvider.length The number of items in a data provider.
Event Description
DataProvider.modelChanged Broadcast when the data provider is changed.
Method Description