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. TreeView SelectedNodeChanged [modified]

TreeView SelectedNodeChanged [modified]

Scheduled Pinned Locked Moved ASP.NET
c++helpquestioncsharp
3 Posts 2 Posters 1 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.
  • M Offline
    M Offline
    maizhiming
    wrote on last edited by
    #1

    I have a regular ASP.NET TreeView control on my page that is auto populated from an XML file using DataBindings. In the SelectedNodeChanged event handler routine, I have it make the text of the selected (clicked) node bold. My problem is: It doesn't matter which node I click on, it always bolds the top most node in that level of the tree. It never bolds the node I selected unless it is the top most node of a level. It appears as if the page is doing a postback to the server (as it should). But I am not sure if that is the issue. How do I make it so that the node I click on stays "clicked". Here is what I am talking about: If this is my tree (below) and I click on "VBScript" it bolds "XML" when it should actually bold "VBScript".

    Main
    XML
    XHTML
    Visual C++
    Visual Basic
    VBScript
    UML

    PS. Is there a way to implement a control-click event for the TreeView control? -- modified at 18:59 Wednesday 21st June, 2006

    M 1 Reply Last reply
    0
    • M maizhiming

      I have a regular ASP.NET TreeView control on my page that is auto populated from an XML file using DataBindings. In the SelectedNodeChanged event handler routine, I have it make the text of the selected (clicked) node bold. My problem is: It doesn't matter which node I click on, it always bolds the top most node in that level of the tree. It never bolds the node I selected unless it is the top most node of a level. It appears as if the page is doing a postback to the server (as it should). But I am not sure if that is the issue. How do I make it so that the node I click on stays "clicked". Here is what I am talking about: If this is my tree (below) and I click on "VBScript" it bolds "XML" when it should actually bold "VBScript".

      Main
      XML
      XHTML
      Visual C++
      Visual Basic
      VBScript
      UML

      PS. Is there a way to implement a control-click event for the TreeView control? -- modified at 18:59 Wednesday 21st June, 2006

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Do the TreeNodes have the same value? Make sure they should have different values for each node

      M 1 Reply Last reply
      0
      • M minhpc_bk

        Do the TreeNodes have the same value? Make sure they should have different values for each node

        M Offline
        M Offline
        maizhiming
        wrote on last edited by
        #3

        That was the problem. Thanks for the tip.

        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