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.

Reply via email to