Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Asp.net + Hiding Tree View nodes ?

Asp.net + Hiding Tree View nodes ?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdata-structureshelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Naveed Kamboh
    wrote on last edited by
    #1

    Hello Friend, I am using a treeview and populating it from web.sitemap. On the basis of text vlaue I want to hide some nodes for the users. I am not finding how to hide the nodes. can any one help me please. thanks

    Naveed Kamboh

    R 1 Reply Last reply
    0
    • N Naveed Kamboh

      Hello Friend, I am using a treeview and populating it from web.sitemap. On the basis of text vlaue I want to hide some nodes for the users. I am not finding how to hide the nodes. can any one help me please. thanks

      Naveed Kamboh

      R Offline
      R Offline
      Ryomin
      wrote on last edited by
      #2

      Hi, I'm not sure if this is what you are looking for but here goes. Tree Looks like this Tree Node 1 Tree Node 1 a Tree Node 1 b Tree Node 1b i Tree Node 1b ii Tree Node 1 c Lets say you want to hide Tree Node 1b ii TreeView.DataSource = SiteMapDataSource1; TreeView.DataBind(); TreeView.Nodes[0].ChildNodes[1].ChildNodes.RemoveAt(1); //This hides tree node 1b ii Hope this helps. Remember in order to do this you have to programatically bind the TreeView. Note remove the DataSourceID from the IDE first. Good luck

      Cheers Disgyza Programmer Analyst

      N 1 Reply Last reply
      0
      • R Ryomin

        Hi, I'm not sure if this is what you are looking for but here goes. Tree Looks like this Tree Node 1 Tree Node 1 a Tree Node 1 b Tree Node 1b i Tree Node 1b ii Tree Node 1 c Lets say you want to hide Tree Node 1b ii TreeView.DataSource = SiteMapDataSource1; TreeView.DataBind(); TreeView.Nodes[0].ChildNodes[1].ChildNodes.RemoveAt(1); //This hides tree node 1b ii Hope this helps. Remember in order to do this you have to programatically bind the TreeView. Note remove the DataSourceID from the IDE first. Good luck

        Cheers Disgyza Programmer Analyst

        N Offline
        N Offline
        Naveed Kamboh
        wrote on last edited by
        #3

        thank you very much dear, it worked. I am happy.

        Naveed Kamboh

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups