DataSet.getItemId()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.getItemId([index])
Parameters
A number specifying the item in the current view for which to get the ID. This
index
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
. This identifier is unique only in this collection and is assigned
index
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 = my_ds.getItemId();
trace("Employee id(" + itemNo + ")");
The following example uses
to search for an item in the current collection
DataSet.find()
whose
and
fields contain the values
and 105, respectively. If found,
name
id
"Bobby"
is used to get the unique identifier for that item, and
DataSet.getItemId()
is used to position the current iterator at that item.
DataSet.locateById()
370
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