How do I get text value of selected item in List?

  • Question
  • Updated 2 years ago
  • Answered
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.
Photo of Mike M.

Mike M.

  • 15 Posts
  • 0 Reply Likes
  • frustrated for lack of documentation

Posted 6 years ago

  • 2
Photo of Xavier Young

Xavier Young, Official Rep

  • 1343 Posts
  • 151 Reply Likes
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.
Photo of Tim - xemware

Tim - xemware

  • 127 Posts
  • 3 Reply Likes
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?
Photo of Xavier Young

Xavier Young, Official Rep

  • 1343 Posts
  • 151 Reply Likes
Understood and we will try to :)
Photo of Xavier Young

Xavier Young, Official Rep

  • 1343 Posts
  • 151 Reply Likes
V2.35 contains the new "selectedText" element property for combobox.
Photo of Jon Plummer

Jon Plummer

  • 8 Posts
  • 0 Reply Likes
It'd be cool if this also applied to lists...
Photo of hanzhiding

hanzhiding

  • 6 Posts
  • 0 Reply Likes
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?
Photo of ViVi

ViVi, Official Rep

  • 829 Posts
  • 57 Reply Likes
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 conversation is no longer open for comments or replies.