alreadyused Posted January 16, 2006 Posted January 16, 2006 (edited) I have a post here: http://www.xtremedotnettalk.com/showthread.php?p=452663#post452663 if you want to know where I'm coming from on this. But that's just for general direction. I now have an error and need some help. I have three different objects (Jobs, Products, Revisions) I am wanting to list these in a tree Jobs |__Projects |_Revisions I'm having a hard time with this command: formJobClient.tvwData.Nodes(strNodeParent).Nodes.Add(strNodeChild) because the parent node, where I have strNodeParent, is wanting an integer for the index, rather than the name of the node. Given the name of the parent node, how do I find the index position of it? For example, I know the parent node is named "1-Job A", but I have no clue how to get the index position... any thoughts? Sorry all, I should have done a better job searching. Just found these links: http://www.xtremedotnettalk.com/showthread.php?t=69225&highlight=treeview+index http://www.xtremedotnettalk.com/showthread.php?t=69215&highlight=treeview+index I think those will take care of me... Edited January 16, 2006 by alreadyused Quote
alreadyused Posted January 16, 2006 Author Posted January 16, 2006 Fixed it using divil's suggestion here: http://www.xtremedotnettalk.com/showthread.php?t=69215&highlight=treeview+index by doing this: dim tNode as new TreeNode tNode = treeView1.Node.Add(...) intIndex = tNode.Index then storing that index in my objects, I can correctly place and call the indexes. I now have the nodes being placed under the correct parents! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.