|
-
Oct 8th, 2002, 10:36 AM
#1
Thread Starter
Fanatic Member
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
-
Oct 8th, 2002, 10:37 AM
#2
Thread Starter
Fanatic Member
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.
-
Oct 9th, 2002, 04:21 AM
#3
Frenzied Member
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...
-
Oct 9th, 2002, 09:29 AM
#4
Thread Starter
Fanatic Member
No worries.
I got the problem solved.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|