Apply the filtering in the result handler function. If you are binding directly to lastResult, this is one more reason why you should not.
Instead, declare a [Bindable] instance variable of the type you want, bind the dg to that, then assign the result data to that var in your result handler function, after applying yur filter of course. Also, be aware that Array has serious limitations when used as a dataProvider. It will be ok in the use which you describe, but you might want to use ArrayCollection instead. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Bromberger Sent: Wednesday, October 03, 2007 1:49 PM To: [email protected] Subject: [flexcoders] Maintain filtering on an array?? Hi all, I was wondering what some methods might be for filtering an array before it is displayed. I have an array that populates a datagrid and I send some updates to the server that effect the array and I want to refresh the array with the data from the server but maintain a filter that has been applied to the array. I have tried calling my filtering functions from collection events and from the function which updates the database but I can't seem to get the filter to apply at the right time. It appears to filter prior to the new data arriving at the array, so when the new data populating the array arrives the filter is lost. Any suggestions? Thanks in advance! - Ken

