473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

SelectedNode is not correct in SelectedNodeChanged event

My asp.net Web application is written in VB, using VS 2005 with
Framework 2.0
I am having trouble with the SelectedNode element. The TreeView is
built programmatically and looks like this:

- PES
+SSI_Engineering
+Sensor:2
+Sensor:3
+Sensor:4
- SSI
+Sensor:1
+Sensor:2
+Sensor:3
+Sensor:4

The SelectedNodeChanged event contains code to grab the selected node:

Dim NodeSelected as TreeNode
NodeSelected = tvLightSystem.SelectedNode
where tvLightSystem is the TreeView control

No matter what node I select, the NodeSelected is set to the
SSI_Engineering node

I even tried writing code in the TreeNodeExpanded event similar to the
code above:

Protected Sub tvLightSystem_TreeNodeExpanded(ByVal sender As
Object, ByVal e As System.Web.UI.WebControls.TreeNodeEventArgs) Handles
tvLightSystem.TreeNodeExpanded
NodeSelected = e.Node

End Sub
Again, e.Node is always 'pointing' at SSI_Engineering node no matter
which nodes plus sign I click to expand it.

Any ideas/hints would be appreciated

Thanks,
Stacy

Sep 19 '06 #1
0 1395

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

Similar topics

4
by: David Elliott | last post by:
Hi, I have a Windows Explorer-like treeview that displays directories. After a cut/paste operation, I want the treeview to display the folder where the paste happened. But, I'm running into a...
2
by: mike uk | last post by:
I'm generating a treeview (in asp.net Page_Load event) by adding nodes to a treeview control, and then selecting a single node in the tree using node.Select(). EnableClientScript property is set...
0
by: Bobby Owens | last post by:
Hi, I'm current having a problem with the treeview control and multi threading. The treeview is on a form. A request is then sent to a server using IP for the data. The data arrives in an event...
4
by: Andrew Robinson | last post by:
I am using a TreeView to perform navigation and have a few nodes that need to generate a popup menu. For this, I use the SelectedNodeChanged event and then add the relevant "window.open" script to...
1
by: Dean Hinson | last post by:
Hello, I am trying to spawn a sunroutine in a worker thread for populating a trreeview. I set the selectednode and then start the thread. However, the thread errors because the selectednode was...
8
by: Jerry | last post by:
Hello, I am able to GET the selected node with my code. I would however like to SET any node with code. Something like me.treeview.selectednode="First" But this doesn't work. I can't find...
0
by: Velislav | last post by:
Hi Quick question: Theoretically, is the SelectedNodeChanged event fired when the currently selected node is actually changed (as the name implies) or when any node is selected, including the...
0
by: Chris | last post by:
I am using CSS adaptors. When I use enen the most basic treeview the SelectedNodeChanged does not fire. Can anyone help, I am totally stuck. I need to use the CSS adaptors to make the site...
1
by: dmeglio | last post by:
I have a treeview control. The "root" elements and the 2nd level elements are set to PopulateOnDemand. All is fine, my TreeNodePopulate triggers and works. When you click one of those nodes, I load...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.