Use a single AC, and just have both criteria in the filter function. Maybe have an instance variable indicating the mode, and in the filter, conditionally apply the deleted flag criteria.
Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of secrit.service Sent: Friday, April 24, 2009 3:30 AM To: [email protected] Subject: [flexcoders] Datagid : filterfunction Hello all, I have a table in my DB containing following fields : - ID - aText : String - flaggedForDeletion : Boolean Suppose all my records have a value of false for field flaggedForDeletion. In my application I have a datagrid and a recycleBin-button. My intention is to create following : When starting my application, the datagrid shows all the records of the DB. When I drag a record from the datagrid to the recycleBin, it gets the value true for field flaggedForDeletion and will be removed from the datagrid. When clicking on the recycleBin-button, the datagrid has to show only these records which are flagged for deletion. Leaving the recycleBin-mode, the datagrid has to show only these records which are NOT flaged for deletion. My question is now how to do this : To my opinion I have 2 possibilities : - using 2 ArrayCollections (acAvailableRecords and acDeletedRecords) Depending what I want to show, I dynamically change the datasource of my datagrid - using only one ArrayCollection and filter it based on the value of flaggedForDeletion. I case of the last solution, I encounter another issue, meaning : I also provided a filterfunction on the datagrid to filter the records based on a string I fill in a searchfield. This means I need to create a double filterfunction : one on field flaggedForDeletion and the other on the content of the searchfield. No idea which is the best solution and if I can use a double filter on a datagridsource. Any help is welcome. Thanks in advance.

