Forum Discussion
If there are any static properties that would uniquely identify them you could use FindChild to find the matching item.
- shankar_r10 years agoCommunity Hero
I know only the Text of the particular tree item nothing else.
If i want to find a tree item based on its text, How i can do that.
And the tree items are nested so i don't know on which thisngs it theres
- tristaanogre10 years agoEsteemed Contributor
FindChild and related methods allow you to search in your tree of objects for any child given a particular set of properties. So, if you only know the text, you would call something like
... var PropertyList = new Array("Text") var PropertyValues = new Array("MyText") ... var MyTreeItem = ParentObj.FindChild(PropertyList, PropertyValues, 5)See FindChild Method
- shankar_r10 years agoCommunity Hero
I tried the option which you have described. But
TreeObject
1.TreeItem1
1.1 MainTopic
1.1.1 TestTopic
1.1.1.1 HaveToClick
1.1.1.1 HaveToClick is child of 1.1.1 TestTopic, I am having only the 1.TreeItem1 object.
If i use like this below,
var PropertyList = new Array("Text") var PropertyValues = new Array("1.1.1.1 HaveToClick") ... var MyTreeItem = 1.TreeItem1(Object).FindChild(PropertyList, PropertyValues, 5)It won't get the 1.1.1.1 HaveToClick.