Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Search all nodes in the Webdatatree including Child nodes
posted

Hi

I need to search in a webdatatree if a node is present or not using the Key.

example

Mytree.Nodes.FindNodeByKey(sKey)

I pass the id to the FindNodeByKey which contains the Key.

But the above code only searches in the first level where as I need to search in the child level also if present.

Presently I have written for loop for it

For Each oItem As DataTreeNode In MyTree.Nodes

oNode =oItem.Nodes.FindNodeByKey(sId)

If oNode IsNot Nothing Then Exit For

Next


This code is ok as I know I have only on child level. but in future it may increase.

Is there any method which gives me all the nodes present in the Tree from the root to the last child node.


Please let me know if its there.

Thanks

Vijay


Parents Reply Children
No Data