How do I show the selected node in the TreeView?

F

Flyguy

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?
 
S

Steven Cheng

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.


--------------------
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top