PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 2024 → List of Values column on a Table control
List of Values column on a Table control
Iniciado por Carlos, fev., 20 2022 10:12 PM - 4 respostas
Membro registado
37 mensagems
Publicado em fevereiro, 20 2022 - 10:12 PM
Hi and thanks in advance for the help.

I have this List of Values column in a memory table

The List of value column gets loaded via ListAdd()

I am having trouble how to get the value a user picks once an item from the list of value box is selected

The function ..DisplayedValue is not available for the List of Values List box column.

So what I am trying to do is once the user selects an item, an Info message pops up stating
"You have Selected Front Desk" or whatever item was selected by the user.

I have included a Youtube private link just for this question, which explains more or less what is going on.



Thank you so much for the help.

Best regards

--
Best regards,

Carlos
Membro registado
68 mensagems
Publicado em fevereiro, 20 2022 - 11:13 PM
Hello Carlos

Try using MySelf[MySelf].DisplayedValue in the selecting a row.
This is assuming that you used row number as the returned value for the table.

HTH,
Chris C

--
Sometimes waiting is the best way forward...
Publicado em fevereiro, 21 2022 - 3:37 AM
CCordes wrote:
Hello Carlos

Try using MySelf[MySelf].DisplayedValue in the selecting a row.
This is assuming that you used row number as the returned value for the table.

HTH,
Chris C

--
Sometimes waiting is the best way forward...


Hi Chris,

Thank you so much for the help.

I did what you told me to do, however, I am getting the same result, a -1

Hope more ideas come along.

Thanks
Regards
Publicado em fevereiro, 21 2022 - 12:29 PM
one way of going around this problem is to add ahidden listbox somewhere (outside the table, of course)
When you do your listadd in the table, you do a second one identical in the listbox control, and when you get your line number from the table control, you can get the label from the listbox
Publicado em fevereiro, 21 2022 - 4:21 PM
argus wrote:
one way of going around this problem is to add ahidden listbox somewhere (outside the table, of course)
When you do your listadd in the table, you do a second one identical in the listbox control, and when you get your line number from the table control, you can get the label from the listbox


Hi Argus,

Yes, I thought of that, however, I want it to go the simple way and that is discovering which item was selected by the user in text, not by index number. Is hard for me to believe that a List box on a table cannot be treated as a regular list box

Let me try your way and I will let you guys know.

Thanks again for all the help

Best Regards,