On teh ComboBox change you can the filter on the ArrayCollection.source that contains the data. And set the filtered Array as the dataprovider for the datagrid.Take a look at filter function of Array class.
Thank you Gaurav. Currently the datagrid dataprovider is getEmployeesResult.lastResult, which is a call responder. Do I need to use a call responder result event to move the data in .lastResult into an array before I can filter the way you recommended?
And, if I understand correctly and that is the case, can you point me to an example of how this is done? If I find one in the meantime I'll post back here.
I was able to get the data returned from a PHP call into an array by placing the following in the service result handler:
public var myEmployeesArray : Array;
public var myEmployeesDataProvider : ArrayCollection;
myEmployeesArray = mx.utils.ArrayUtil.toArray(event.result);
myEmployeesDataProvider = myEmployeesArray; //data provider for the datagrid
Not certain how to use filterfunction yet though. I started to read this page but need to work on it more: http://cookbooks.adobe.com/post_Using_the_to_ArrayCollection_s_filterFunction-5441.html
I'd like to filter only one field in the ArrayCollection.
Also, for anyone else who may be learning while reading this, I found the following page helpful in figuring out how to load the PHP service return data into an array: