How do I show the selected node in the TreeView?

Discussion in 'ASP .Net' started by Flyguy, Mar 2, 2008.

  1. Flyguy

    Flyguy Guest

    I have a TreeView with so many nodes that it requires scroll bars. When the
    user selects a node the screen is refreshed and the selected node is no
    longer visible. The TreeView is opened to the selected node but the screen
    is not scrolled to it. How can I get the TreeView to show the selected node
    after it has been refreshed?
     
    Flyguy, Mar 2, 2008
    #1
    1. Advertising

  2. Flyguy

    Steven Cheng Guest

    Hi,

    As for the following question you mentioned:

    ==========
    How can I get the TreeView to show the selected node after it has been
    refreshed?
    ===========

    do you mean you want to keep the browser at the original position(before it
    postback) when you select a Node in TreeView?

    If this is the case, you can try setting the
    "MaintainScrollPositionOnPostback" attribute to "true" on the aspx page.
    This can help make the page keep scroll to the last point before you
    perform postback operations(such as select node in TreeView or click a
    postback button...):

    <%@ Page Language="C#" ..............
    MaintainScrollPositionOnPostback="false" %>


    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    This posting is provided "AS IS" with no warranties, and confers no rights.


    --------------------
    >From: =?Utf-8?B?Rmx5Z3V5?= <>
    >Subject: How do I show the selected node in the TreeView?
    >Date: Sat, 1 Mar 2008 19:46:01 -0800


    >
    >I have a TreeView with so many nodes that it requires scroll bars. When

    the
    >user selects a node the screen is refreshed and the selected node is no
    >longer visible. The TreeView is opened to the selected node but the

    screen
    >is not scrolled to it. How can I get the TreeView to show the selected

    node
    >after it has been refreshed?
    >
     
    Steven Cheng, Mar 3, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wolf
    Replies:
    0
    Views:
    578
  2. Replies:
    0
    Views:
    1,670
  3. Tjerk Wolterink
    Replies:
    2
    Views:
    1,521
    Dimitre Novatchev
    Aug 24, 2006
  4. jiing
    Replies:
    0
    Views:
    2,427
    jiing
    Apr 27, 2007
  5. Mark Goldin

    Show selected node in TreeView

    Mark Goldin, Feb 16, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    152
    Mark Goldin
    Feb 16, 2004
Loading...

Share This Page