User Guide

324 Chapter 6: Components Dictionary
Example
The following code positions the data set inventoryData at the first item in its collection,
and then displays the value of the
price property contained by that item using the
DataSet.currentItem property.
inventoryData.first();
trace("The price of the first item is:" + inventoryData.currentItem.price);
See also
DataSet.last()
DataSet.getItemId()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSet.getItemId([index])
Parameters
index
A number specifying the item in the current view for which to get the ID. This
parameter is optional.
Returns
A string.
Description
Method; returns the identifier of the current item in the collection, or that of the item specified
by
index. This identifier is unique only in this collection and is assigned automatically by
DataSet.addItem().
Example
The following code gets the unique ID for the current item in the collection and then displays it
in the Output panel.
var itemNo:String = myDataSet.getItemId();
trace("Employee id("+ itemNo+ ")");
See also
DataSet.addItem()
DataSet.getIterator()
Availability
Flash Player 7.