closed
Public

How do I get the text value of the selected item in a list? I have a list, it contains “Bob, Jill, and Jerry”. I want to get the name that is selected so I can update some other values. I’m able to update the other values with the selectedIndex of the list, but can’t figure out how to get the name from the list.

5 answers

Getting current value of list / tree in simulation is not supported yet. However it is planned 🙂

You can use the table element with one column. You can make it look like a list (by hiding the header). You will be able to get the cell value in the table element.

#1

I know it’s on your todo list, but it’s becoming much more necessary to use text value instead of selected index for increasingly complex mockups – any chance of slipping this in for getting combobox value?

#2
  1. Understood and we will try to :)

V2.35 contains the new “selectedText” element property for combobox.

#3

It’d be cool if this also applied to lists…

#4

Hi,

Can I confirm that getting the text value of selected item in a tree component, so that we can use it to update other component’s text is not yet implemented?

#5
  1. Hi hanzhiding, getting selected text of Tree element will be supported in next version. Before that you could only get the selected index (row) of the tree element.

This question is now closed