PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → List of Values column on a Table control
List of Values column on a Table control
Débuté par Carlos, 20 fév. 2022 22:12 - 4 réponses
Membre enregistré
37 messages
Posté le 20 février 2022 - 22:12
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
Membre enregistré
68 messages
Posté le 20 février 2022 - 23:13
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...
Posté le 21 février 2022 - 03:37
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
Posté le 21 février 2022 - 12:29
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
Posté le 21 février 2022 - 16:21
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,