When developing an application in VB.NET I was very disappointed to know that there is no Key property provided for the TreeNode objects.
Well, at least I can't work without Key property, as I always keep the IDs of my items in the Key property only.
So, finally i used the following custom Node class for my purpose.
To access the nodes, we just have to typecast the selected node of the tree to our custom class.
You can add any property you require in the same class for extensibility.
ndCurrentNode = CType(tvwStructure.SelectedNode, clsCustomTreeNode)
0 comments
Hide comments