the fastest solution is to code a common filtering ui (that can be dropped on any grid)
Have a main form with a query or filter button, that takes you to a common ui query form. On return from the form collect the filter string and apply it.
The ui I used is a left to right datagrid process. All your filter options are in a db and displayed on the right side of the form (show name of option), dblclick an option, opens a ui specific to the selection and stores info into query format (to another field or another table) and refresh the two grids. It now displays the selection on the right side now. Press ok and close the form. The parent collects the new settings from the db and updates the grid, as little code as possible here.
Multi-picklist now are a simple list of records, no ui needed So "Category=New Account" doesn't need any ui. "Account contains" would need a ui and appear on right side as "account contains 'abc' ". Only need a few ui's since reusable. Real code is in the query form on close, it needs to figure out the And/Or logic and define (). sort by field as you process or if really advanced users add And/Or option on form and append to filter selection, so retults say "account contains 'abc' or " and process sequencially.
whole thing is reusable too, just add form name to filter options avaliable (and specifics of target field etc) and pass data back in format so can drop into grid. At this point configuration is a db formatting issue so any form can be filtered. |