oc A

oc A

  • NA
  • 30
  • 0

Select Node in TreeView Control

Aug 6 2008 4:52 AM
Hai All,
i am doing a VB.NET Windows Application. In this i am using a TreeView Control . After filling some text boxes and click Add button it should add one node and that node should me seen selected. How i can do the coding for this ?the code that i did is ...

Dim nod As New TreeNode
nod.Text = "CS"
tVwCStr.Nodes.Add(nod)
tVwCStr.SelectedNode = nod

This code adds one node to the treeview . But selection is not working. thats that node is not seen selected even after adding the code statement tVwCStr.SelectedNode = nod. How i can make it selected . plz help ..

Answers (3)