while finding an solution to your problem i finally got the solution...
i need to check each Main node Child Node and Grand Child node
Here is the code:
Code:
If Not MySelectedNode Is Nothing Then
For Each RootNode As TreeNode In TreeView.Nodes
If RootNode.Text = MySelectedNode.Text Then TreeView.SelectedNode = RootNode
For Each ChildNode As TreeNode In RootNode.Nodes
If ChildNode.Text = MySelectedNode.Text Then TreeView.SelectedNode = ChildNode
For Each GrandChildNode As TreeNode In ChildNode.Nodes
If GrandChildNode.Text = MySelectedNode.Text Then TreeView.SelectedNode = GrandChildNode
Next
Next
Next
End If
now working good
Bookmarks