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 ...
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 ..
Habeba KhaledPosted Aug 6, 2008, 5:44 AM
You just have to set the the focus on ur tree
tVwCStr.Focus()
// Focus() in c# I don't know what's the equivelant in vb, may be SetFocus()
Done !
Habeba KhaledPosted Aug 6, 2008, 8:00 AM
U r welcome oc A
wish u good luck
:)
oc APosted Aug 6, 2008, 7:12 AM
Thanks a lot Habeba... its working fine. In VB.NET also it is Focus().. Expecting more help from you in future also . Once again Thanks