Results 1 to 4 of 4

Thread: Dynamic Tree View

  1. #1

    Thread Starter
    Fanatic Member JCScoobyRS's Avatar
    Join Date
    Oct 2002
    Location
    Some Mountain in Colorado
    Posts
    677

    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

  2. #2

    Thread Starter
    Fanatic Member JCScoobyRS's Avatar
    Join Date
    Oct 2002
    Location
    Some Mountain in Colorado
    Posts
    677

    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.

  3. #3
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    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...

  4. #4

    Thread Starter
    Fanatic Member JCScoobyRS's Avatar
    Join Date
    Oct 2002
    Location
    Some Mountain in Colorado
    Posts
    677

    Arrow 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
  •  



Click Here to Expand Forum to Full Width