:: Forum >>

get item text of tree control

Hello,

I have a tree object. When I click on an item in the tree, I can get the index of the item, but how can I get the text of the item as well?

Also how can I get the parent value of the child? Example:

Colors
|
----- Red
|
----- Blue

If I click on 'Red', I'd like to get the text 'Red', and if it is a child node, also get the value 'Color' too. Again, I can get the index of the clicked item correctly, just how could I get the text using that index?
BazookaJoeZone
Sunday, March 12, 2006
Anyone?
BazookaJoeZone
Monday, March 13, 2006
Maybe like this -

obj.onItemClicked = function(event, index){
        alert(this.getItemText(index));
    }
Alex (ActiveWidgets)
Monday, March 13, 2006
In AW 2.0 there is no API method to get parent index of the node, which is quite stupid (bug).

Alex (ActiveWidgets)
Monday, March 13, 2006
Yes that works perfectly, I forgot the 'this'!

One other question on this - when I create the tree in my own script, the '+', '-' icons do not appear beside the parent nodes.. what file(s) are those images included in?

The mouse cursor changes to a hand when I hover over the area where the '+', '-' should be, they just aren't being displayed. I'm using firefox.

Thanks!
BazookaJoeZone
Monday, March 13, 2006
Are there any plans to fix this bug? "In AW 2.0 there is no API method to get parent index of the node, which is quite stupid (bug)." Is there a work around?

Thanks.
Juliya.
Wednesday, August 9, 2006
http://www.activewidgets.com/javascript.forum.15630.1/getting-all-folder-parents-of.html
Alex (ActiveWidgets)
Thursday, August 10, 2006

This topic is archived.


Back to support forum

Forum search