User Guide

364 Components Dictionary
Add the following code to Frame 1 of the main timeline:
editorsChoice_ch.label = "Editor's Choice";
reviews_xmlconn.direction = "receive";
reviews_xmlconn.multipleSimultaneousAllowed = false;
reviews_xmlconn.URL = "http://www.helpexamples.com/flash/xml/reviews.xml";
reviews_xmlconn.trigger();
reviews_dg.setSize(320, 240);
reviews_dg.addColumn("name");
reviews_dg.addColumn("rating");
reviews_dg.addColumn("reviewDate");
reviews_dg.getColumnAt(0).width = 100;
reviews_dg.getColumnAt(1).width = 100;
reviews_dg.getColumnAt(2).width = 100;
reviews_dg.setStyle("alternatingRowColors", [0xFFFFFF, 0xF6F6F6]);
editorsChoice_ch.addEventListener("click", editorsChoiceListener);
function editorsChoiceListener(evt_obj:Object):Void {
reviews_ds.filtered = evt_obj.target.selected;
reviews_ds.filterFunc = function(item:Object):Boolean {
return (item.editorsChoice == 1);
};
}
Select Control > Test Movie. By default, the DataGrid component should display each of the
reviews from the external XML document. Clicking on the Editors Choice CheckBox
component causes the DataSet component to be filtered, so that only the specific reviews
flagged as an editors choice appear.
See also
DataSet.filtered
DataSet.find()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.find(searchValues)