472,951 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,951 software developers and data experts.

How do I show the selected node in the TreeView?

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?
Mar 2 '08 #1
1 3884
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?= <fl****@nospam.nospam>
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?
Mar 3 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: hzgt9b | last post by:
Using visual studio .NET 2003, VB: I'm experiencing an issue with a TreeView object when it gets focus - the first root node in the tree always gets selected when the control gets focus - even if...
2
by: ONIL | last post by:
I have a treeview in my ASP.NET vb.net application.when someone selects a node on the treeview How do I set the node name myNodeName = TreeView1.Nodes(TreeView1.SelectedNodeIndex).Text The...
1
by: James L | last post by:
Hi, I have a treeview that has to be refreshed due to data changes. Is it possible to select the last node that they were viewing when the tree view was been populated once again? I have...
1
by: jesper_lofgren | last post by:
Hello, Iam using Treeview control in asp.net 2.0. But have a problem. I use NavigateUrl BUT then viewstate is lost when clicked on a link i the menu. And the selected node is lost. Then i...
1
by: Wes | last post by:
Hi there, Does anyone know how to get the selected node from a ASP.Net 2.0 TreeView in Javascript? I used to be able to get it in the old webcontrols one, but now the properties have changed...
2
by: rfm | last post by:
I have a TreeView with 1 expanded top node, it has several childnodes (call it row A), which have childs of their own. The top node is selected correctly and all childnodes from the row A nodes...
0
Bob Ross
by: Bob Ross | last post by:
I am sure this is just me being stupid but I can't work out why there is no selected node when a treeview is disabled. I build the treeview in the code behind and disable it if a property is true...
1
by: Falcula | last post by:
Hello, I have a treeview control, when i select a item i navigate to url. But selected node is lost, it reset itself, loosing state. I post my code here. Thanks in advance. <script...
9
by: auntiejack56 | last post by:
Hi, I've got a treeview, and I want to display the node text property that I have a) clicked on or b) highlighted using the up or down arrows
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.