View Single Post
  #2 (permalink)  
Old August 26th, 2006, 04:16 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 33,563, Level: 80
Points: 33,563, Level: 80 Points: 33,563, Level: 80 Points: 33,563, Level: 80
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,231
Thanks: 7
Thanked 203 Times in 201 Posts
Default

Hi there,

You have a few options. One is to stick with the XSL file. I am not too good with XSL to I can't recommend much to improve your code.

Alternatively, you can use the SiteMap file and provider. This control displays hierarchical data by default. You could write a physical copy of the site map whenever you make a change in the categories in the system.

Finally, you can indeed use a relational dataset with a self referencing column. You could write a recursive method that loops through this dataset and manually adds nodes to the TreeView at the requested level. I have done that a while ago, so I can assist you with it if you need some help.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote