21
Answers

Save ArrayList to Tree Nodes

rulec444

rulec444

20y
12.4k
1
I want to use a TreeView to show items the user selects in several different categories, however, I can only get it to work for adding root nodes (not child). For example, I want something like: STATE - 1st State - CITIES - 1st City - 2nd City - 3rd City - 2nd State - CITIES - 1st City - 2nd city - ZIPs - 1st Zip - 2nd Zip COUNTRY etc... where the capitalized entries are hard coded and the users choices dynamically fill the child nodes. This is the code I have in my method: TreeView tv = new TreeView; tv.Nodes.Add((GeoArray).ToString()); This only shows "Systems.Collections.ArrayList" in new root nodes for the number of items I selected in the listbox. I've looked in forums and books but there is not a lot of info on TreeViews. Any help is appreciated.
Answers (21)