Skip to content
Advertisement

How to get the value of a selected treeview item?

I’ve looked at several posts regarding this and they’ve done the following

-The output i get is blank

-The output i get is the id, which is practically useless unless somebody can show me how to manipulate it

-No output at all

i just want to be able to click an item in treeview, and instantly be given the text i just clicked

JavaScript

This code gives me ‘I001’ if i click the first item, and ‘I002’ when i click the second; id assume these are column values in the tree, but still useless to me

Advertisement

Answer

You can get a list of the selected items with the selection method of the widget. It will return a list of item ids. You can use the item method to get information about each item.

For example:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement