Treeview Control bound to Sitemap question

Discussion in 'C#' started by Rickshaw Driver, May 22, 2006.

  1. #1
    Is there a way to get items on the same level as the "root" item, or do you have to have a root item all by its lonesome on the first tier? I got an error when trying to do something like this and I tried a couple of different ways. Thanks.
     
    Rickshaw Driver, May 22, 2006 IP
  2. fhirzall

    fhirzall Guest

    Messages:
    124
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're binding it to the default xml provider in .net (web.sitemap) then it only allows one root node, but you can use your own sitemap provider with some coding. Check it out here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/CustSiteMap.asp

    Another easier way to do this would be to just go to the properties of your Sitemapdatasource, and set the showstartingnode to false, this will hide the root node and make it seem like the child nodes are all root nodes.
     
    fhirzall, May 27, 2006 IP
  3. Rickshaw Driver

    Rickshaw Driver Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you, I had overlooked the root node false setting and that is exactly what I needed.
     
    Rickshaw Driver, May 29, 2006 IP