PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD16] Displaying filter text in column headings
[WD16] Displaying filter text in column headings
Iniciado por guest, 21,ene. 2013 23:11 - 10 respuestas
Publicado el 21,enero 2013 - 23:11
The filters are functioning correctly on our tables, but a problem some of our users are having is that they will filter a table and forget about it. There is no visible indication that the table has been filtered, so they will become confused.

Is there a way to display the text in the column?

For example, I'm looking for the customer "McDonald's" so I click the filter symbol on the "Customers" column, a white box appears, and type I in "McDonald's." Right now the column will just go back to saying "Customers" when I'm done typing; could I get the white box to stay with "McDonald's" written in it, or at least have some indication that there is a filter active on that column?

I've looked all over the table description and haven't found anything.
Publicado el 22,enero 2013 - 07:40
Hello FMUser

What you are asking for is a good idea, but it is not possible at the moment - you could put it to tech support as a suggestion.

The only indicator available at the moment is the graphic in the column header changes from a magnifier to the filter symbol when a filter has been set. Hovering the mouse over the graphic symbol will display the filter condition in a tool tip.

Regards
Al
Publicado el 22,enero 2013 - 07:40
FM User,
Had same issue and reported it to tech support. The more people report it the more likely thay are to fix it.

This was there response:
Thank you for the feedback. A suggestion has been sent to our developers to add this feature in a future version.

DW
Publicado el 22,enero 2013 - 22:31
Thanks for the replies. At least I know it isn't a feature I'm missing; I'll report it as suggested.
Publicado el 22,enero 2013 - 23:37
Hi, let me have a look into it, maybe there's a way to accomplish that. I smell it. Takes somes days, Currently, I'm busy. Regards, Guenter
Publicado el 26,enero 2013 - 10:37
Hi FMUser,

you can download a small and unfinished project which basically does what you wish:
http://www.windev.at/files/WD17_TableSearchExample.zip
currently, you can input 'a' and 'b'
Still to do:
- add the other characters a - z and 0 - 9 (easy to add)
- moving a cursor in the edit control (arrow left, arrow right) and reflect cursor position in a variable - doable
- integrate backspace and delete - doable
- reflect opening (resets) and closing of input field (not so big a problem, closing is done by Enter and Escape keys)
- integrate shift / shift lock (not sure whether or how it will work) and put actual status into variables.
- retrieve current filter (didn't try at all, seems to be not so easy)
- set values into column title (easy) on closing the input field.
- rebuild the whole thing as a procedure with parameters / indirection in order to be able to use it on any Table & column.

if there's time, I'll try to add some functionality.
Regards,
Guenter
Publicado el 27,enero 2013 - 01:42
Hi. FMUser

What if you:
1-Forbid the table columns to be filtered (in the 7-tab window)
2-Place an edit control above each of the table's column, to actually filter the table:

This has some adventages:
-just a few lines of code in each edit control.
-You can make customized and better filtes; you can filter some columns with "TableEnableFilter" and others will do "HExecuteQuery and TableDisplay", depending on your needs.

Also if you like, you can use the function "ControlClone" to create all edit controls automatically, and with the same anchor as the columns.

Regards,

José Antonio Garrido.
Publicado el 27,enero 2013 - 10:24
Quote
Jose Antonio Garrido

Hi. FMUser



What if you:

1-Forbid the table columns to be filtered (in the 7-tab window)

2-Place an edit control above each of the table's column, to actually filter the table:



This has some adventages:

-just a few lines of code in each edit control.

-You can make customized and better filtes; you can filter some columns with "TableEnableFilter" and others will do "HExecuteQuery and TableDisplay", depending on your needs.



Also if you like, you can use the function "ControlClone" to create all edit controls automatically, and with the same anchor as the columns.



Regards,



José Antonio Garrido.

Hi José,

you're right! This seems to be the much easier and much more promising way to do it. No event-juggling necessary. I just wanted to show that it is possible to get at the input data of the Table-Input-Search-field. Renewing the filtering with 'on each change' of an edit control should do it.

Kind regards,
Guenter
Miembro registrado
71 mensajes
Publicado el 08,mayo 2015 - 16:31
Hi,

I am trying to solve the same thing. I checked your ideas and I just would like to ask what did you use finally.

I quite like the idea with edit boxes above columns, I just do not know how to keep them exactly above each column when user resize table/window and how to change their size.

Or did you find another solution? It looks like there is still nothing new in WD19 or 20.

Thanks

Petr
Publicado el 28,agosto 2015 - 15:21
I've got the same problem.

Is there already a solution ?

I've post the following request to PC Soft

Details of the request:
With a table you can filter on a column.
Is there also an event when you activate the filter on a specific column ?
When you select a column in a table - Code you have the following events
initializing,entry in,exit from,whenever modifying,whenever performing a search with the magnifier in,whenever sorting.

There is no event whenever filtering. Or is there another method to do something after the filter ?

How can you detect which filter is active on a table ?
Miembro registrado
71 mensajes
Publicado el 31,agosto 2015 - 09:35
Hi Ignace,

please let us know if PC soft will give you some answer.

Thank you!

Petr