Skip to content

Making a treeview with ul and li

Andre

Asked May 7, 2007, 6:26 AM EDT1 answer
Share
LinkedInX

Hi everyone,

I want to make a treeview with data from the Indexing Service. I have configured everything but now I got the following problem:

I get an Array with data back from the Indexing Service.

For example:

Item[0]
-Children[0]
-Children[1]

Every Child has also a child and can be 5 or 6 childs deep.

For example:

Item[0].Children[0].Children[1].Children[2].Children[3].Children[4]

Now I would like to make a treeview with

    and

For example:


   

  • Item[0].Name
           

                 
    • Item[0].Children[0].Name
                     
                          
    • Item[0].Children[0].Children[1].Name
                          

    •                
                 
                 
    • Item[0].Children[1].Name
                     
                          
    • Item[0].Children[1].Children[1].Name
                          

    •                
                 
             
         

  •    
  • Item[1].Name
           

                 
    • Item[1].Children[0].Name
                     
                          
    • Item[1].Children[0].Children[1].Name
                          

    •                
                 
                 
    • Item[1].Children[1].Name
                     
                          
    • Item[1].Children[1].Children[1].Name
                          

    •                
                 
             
         

  • How can I generate this in a WebCustomControl?

    Can someone help me out with this?

    1 Answer

    Know the answer? Post it. Somebody with the same question will find it here.

    • 0
      Well I did some home work and did make some nested functions.

      I have it working with everything I need.
      0