PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD - Excel style column filtering
WD - Excel style column filtering
Iniciado por guest, 11,may. 2015 10:20 - 4 respuestas
Publicado el 11,mayo 2015 - 10:20
Hi,
the build in column filtering on tables has some nice features. However in Excel one can see all possible values, when filtering an column, and place a checkmark. To get a Multi-select filtering of values.
I also don't see this feature in WD20. Is there a smart way to do it myself?
Publicado el 11,mayo 2015 - 18:32
Hi Arie,

In Windev 18 one can filter a table and the export has the filter intact? So this is in version 20 not the case ?

regards
Allard
Publicado el 11,mayo 2015 - 19:27
Hi Allard and Arie,

I think what Arie wants is to filter a table based on a given table column value just as the quick-filter of Excel is doing, which is, a kind of easy-to-use drop-down combo box of all the possible values found in a table column on the column header. The user simply selects on of the value, and the filter is applied.

Arie, there is a home-made solution to mimic Excel:
1. Get the mouse click on the column header.
2. Display a combo box right over the column header at that moment with the possible values.
3. Let the user make a selection.
4. Hide the combo if there is no more filter.

But this is not a very nice solution, yet will resemble Excel.

You could simply do as we do in all our applications: we have a filter box where we put all the searches and easy-filters accessible to the user. So they do not use the AAF but our filters.

Here is an example of what we did for one application (for tables, loopers, graphs, etc., based on a very flexible class, field creation, etc. - the user simply moves the mouse over the filter control and the yellow-filter panel fades-in, selections are taken into account directly or when the panel closes, and when the mouse moves out the panel fades-out; then the user can click a blue "x" to easily remove a filter):
[attachment 1501 filter.png]

This was a challenging project but rewarding for all that was learned through it (and for the end-user of course).

I hope this will give you some ideas for your project and use-case.

Best regards,
Alexandre Leclerc
Publicado el 11,mayo 2015 - 21:39
Yes Alexandre, that's exactly what I mean.
And yes, I was expecting your answer: do it ourselves <img src="/NG2013_WEB/ui/smiley/2.gif" align=absmiddle border=0 alt=":-(">

Challenge is to get it responding fast. I don't bind tables directly to the database, I use an array in between. Which gives me nice opportunity to create a copy of the array with only those records I need. And use this one refill the tablecontrol.
Publicado el 11,mayo 2015 - 22:02
Hi Arie,

You can do two things:

1. Send a nice suggestion to PCSoft.

2. Use a SQL query that will return the specific sub-set of possibilities of the data that will be displayed in your table. This is two SQL call but still will be a very fast way to get the possible filters.

Yeah, the do-it yourself path is not always fun especially when a feature already has 90% of all you need. Then you find yourself redoing everything for one little thing.

Best regards,
Alexandre Leclerc