>
If TreeView have multiple root nodes at top level wich then branch down to multiple levels.
>If user click node at the deep end, how do I find root node of that branch.
>I need actually string of that root node as they are all strings.>
>Here is a method called GetParentNode. You call it from the NodeClick method of the TreeView, passing it the key of the node that was clicked:
>
>
>LPARAMETERS tcKey
>*** Passed the key to a given node, returns an object reference to the parent node
>LOCAL loNode, lcKey
>*** Get the parent node
>loNode = This.Nodes( tcKey ).Parent
>
>*** If we do not have a parent
>*** this is the root node
>IF VARTYPE( loNode ) # 'O'
> RETURN This.Nodes( tcKey )
>ELSE
> This.GetParentNode( loNode.Key )
>ENDIF
>
Thank you Marcia :)
Sergio