ActionScript 2.0 Components Language Reference |
|
|
|
| DataProvider API > DataProvider.addItemAt() | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myDP.addItemAt(index,item)
index A number greater than or equal to 0. This number indicates the position at which to insert the item; it is the index of the new item.
item An object containing the data for the item.
Nothing.
Method; adds a new item to the data provider at the specified index. Indices greater than the data provider's length are ignored.
This method triggers the modelChanged event with the event name addItems.
The following example adds an item to the data provider myDP at the fourth position:
myDP.addItemAt(3, {label : "this is the fourth Item"});
|
|
|
|