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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. TreeView Selected Node Scroll Problem

TreeView Selected Node Scroll Problem

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 3 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.
  • W Offline
    W Offline
    W4Rl0CK47
    wrote on last edited by
    #1

    Hi, I have a TreeView control defined on my page. All works well apart from the fact that the list of nodes it contains extends beyond the bottom boundary of the control so I've wrapped the control in a DIV which adds scroll bars. I can scroll to the bottom of the TreeView and select a node; but unfortunately, the TreeView then scrolls to the top automatically and this means that I can no longer see the node I selected unless I then scroll back down to it. Can anyone tell me how I can prevent this from happening? Thanks :)

    A P 2 Replies Last reply
    0
    • W W4Rl0CK47

      Hi, I have a TreeView control defined on my page. All works well apart from the fact that the list of nodes it contains extends beyond the bottom boundary of the control so I've wrapped the control in a DIV which adds scroll bars. I can scroll to the bottom of the TreeView and select a node; but unfortunately, the TreeView then scrolls to the top automatically and this means that I can no longer see the node I selected unless I then scroll back down to it. Can anyone tell me how I can prevent this from happening? Thanks :)

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Actually the scroller goes to the top because a postback of the page is just been made. :)

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Simplify Code Using NDepend
      Basics of Bing Search API using .NET
      Microsoft Bing MAP using Javascript

      1 Reply Last reply
      0
      • W W4Rl0CK47

        Hi, I have a TreeView control defined on my page. All works well apart from the fact that the list of nodes it contains extends beyond the bottom boundary of the control so I've wrapped the control in a DIV which adds scroll bars. I can scroll to the bottom of the TreeView and select a node; but unfortunately, the TreeView then scrolls to the top automatically and this means that I can no longer see the node I selected unless I then scroll back down to it. Can anyone tell me how I can prevent this from happening? Thanks :)

        P Offline
        P Offline
        Petr Pechovic
        wrote on last edited by
        #3

        Hi, Have you tried MaintainScrollPositionOnPostback in Page directive? http://msdn.microsoft.com/en-us/library/ydy4x04a.aspx[^]

        Petr Pechovic my latest articles: Web Page Loading in Steps - ASP.NET Solution[^] Buttons, Message Box and Confirm Box in ASP.NET 3.5[^]

        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