-
Dynamic Tree View
I have a program that will take advantage of a tree view. It will be used to create and show a product structure. Here is an ex:
ASSEMBLY
|_Sub1
|_Sub2
| |_Sub2-1
| |_Sub2-2
| |_Sub-2-2-1
|_Sub3
Now, I have this partially working but it's not as dynamic as I need to be able to have as many leves as I want as this is only a 3 level assembly is as many subs per level. Right now, I have code to create the tree and for each node, check to see if it has subnodes in the DB, if so, create them, if not, go on to the next parent node. My problem is that they aren't being put in the right spot and it's because right now for each level, I have to be able to call a Sub() for each level, then use another Sub() to check each node in that level for a child. Does anyone know how to help me? I'll post code upon request. Thanks, Jeremy
-
Not correctly shown
There is a Sub2-2-1 that should appear as a child node of Sub2-2 but the extra spaces will not show up. Please advise.
-
OK. Can I clear up a few things..?
First, are you using a treeview control, or are you representing it textually like your example?
Second, what exactly is the problem (sorry, I'm hard of understanding this morning). Are you asking how to create a recursive function, or is there more to it than that?
Sorry. No answers, just questions... :)
-
No worries.
I got the problem solved.