Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to store multiple values associated with each node in tree view

Status
Not open for further replies.

kathryn

Programmer
Apr 13, 2000
776
US
Good morning!<br><br>I am using a small VB application to maintain a multidimensional outline/hierachy for two different software packages our finance department uses.&nbsp;&nbsp;One of the software packages, Essbase, allows administrators to assign multiple &quot;aliases&quot; to each member in the outline.&nbsp;&nbsp;<br><br>I have created a table, currently in MS Access which holds all the relational information necessary to build the tree in VB.&nbsp;&nbsp;In the table are two fields &quot;Default&quot; and &quot;Report&quot;, which hold two different aliases (I will eventually have four alias columns, but I'm starting with two.)<br><br>Currently, when I build the tree, I am using the Tag property of the node to hold a concatenation of the two aliases, with &quot;%%&quot; between them as a delimiter.&nbsp;&nbsp;When a user clicks on a node, I have text boxes set up to display the &quot;unconcatenated&quot;?&nbsp;&nbsp;values.&nbsp;&nbsp;When the user changes an alias, I am updating the tag. <br><br>When the user clicks the &quot;Save Hierarchy&quot; button, I reopen the recordset based on the connection and write back all the info to the table.<br><br>My question (finally!) is, does this approach to storing the aliases make sense?&nbsp;&nbsp;Does the treeview control offer another option that I am unaware of?&nbsp;&nbsp;I don't want to maintain a live connection to the tables while the user is making changes to the tree.<br><br>I probably need to give other info; please let me know if more info would help.<br><br>Any ideas, suggestions, war stories, would be greatly appreciated.<br><br>Thank you,<br>Kathryn<br>
 
Kathryn,<br><br>Sounds ok actually.<br><br>One thing does occur to me - have you thought about using the node index as a pointer into a 2D array?<br><br>That would allow you to store a list of values for each node without the &quot;%%&quot; fiddling.<br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top