User Guide
320 DataProvider API
Returns
Nothing.
Description
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.
Example
The following example adds an item to the data provider myDP at the fourth position:
myDP.addItemAt(3, {label : "this is the fourth Item"});
DataProvider.editField()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myDP.editField(index, fieldName, newData)
Parameters
index A number greater than or equal to 0; the index of the item.
fieldName A string indicating the name of the field to modify in the item.
newData The new data to put in the data provider.
Returns
Nothing.
Description
Method; changes one field of the data provider.
This method triggers the
modelChanged event with the event name updateField.
Example
The following code modifies the label field of the third item:
myDP.editField(2, "label", "mynewData");