User Guide
DataSet.hasSort() 375
Example
The following example iterates over all the items in the current view of the collection (starting
from the its last item) and performs a calculation on the
price property of each item:
my_ds.addItem({name:"item a", price:16});
my_ds.addItem({name:"item b", price:9});
my_ds.last();
while (my_ds.hasPrevious()) {
my_ds.currentItem.price *= 0.5; // Everything's 50% off!
my_ds.previous();
}
for (var i in my_ds.items) {
trace(my_ds.items[i].name + ": " + my_ds.items[i].price);
}
See also
DataSet.currentItem, DataSet.skip(), DataSet.previous()
DataSet.hasSort()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.hasSort(sortName)
Parameters
sortName A string that contains the name of a sort created with DataSet.addSort().
Returns
A Boolean value.
Description
Method; returns true if the sort specified by sortName exists; otherwise, returns false.