DataSet.addItemAt()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.addItemAt(index, item)
Parameters
A number greater than or equal to 0. This number indicates the position at which to
index
insert the item; it is the index of the new item.
An object containing the data for the item.
item
Returns
A Boolean value indicating whether the item was added:
indicates that the item was
true
added, and
indicates that the item already exists in the data set.
false
Description
Method; adds a new item to the data set at the specified index. Indices greater than the data
provider's length are ignored.
This method triggers the
event with the event type
.
modelChanged
addItem
Example
The following example uses the
method to add an item to the DataSet at the
addItemAt()
first position:
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.addItemAt(0, {name:"Bobo", years:1});
342
Components Dictionary
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers