I have a treeview that is coming from a dataset. When I update or delete the data I need to refresh the treeview and keep the setting of the treeview - if it is expanded.
I figured it out.
At the TreeView1_AfterSelect
Dim node As System.Windows.Forms.TreeNode
node = TreeView1.SelectedNode
i = node.Index
j = node.Parent.Index
The reload the treeview with the dataset then do the following:
OOPsies : Let me correct one thing:
At the TreeView1_AfterSelect
Dim node As System.Windows.Forms.TreeNode
node = TreeView1.SelectedNode
i = node.Parent.Parent.Index
j = node.Parent.Index
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.