473,383 Members | 1,870 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,383 software developers and data experts.

TreeNode click event

Desktop TreeView.TreeNode.

Can I detect the click event on the treenode?
Aug 20 '06 #1
2 32504
Alan T wrote:
Desktop TreeView.TreeNode.

Can I detect the click event on the treenode?
Yes, you should subscribe to the AfterSelect event of the TreeView
and then read the SelectedNode property of the TreeView. The treenode
itself doesn't have events, they're all on the treeview.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Aug 21 '06 #2
You can subscribe to TreeView.NodeMouseClick.

The event handler would look something like:

void treeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs
e) {
TreeNode clickedNode = e.Node;
}
Alan T wrote:
Desktop TreeView.TreeNode.

Can I detect the click event on the treenode?
Aug 22 '06 #3

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

Similar topics

2
by: Sean | last post by:
Hi, I have a treeview and user can right click the treenodes, depending on the nodes, different shortcut menu will appear. I want only the shortcut menu to appear if the point of the right...
2
by: paradox | last post by:
How can I go about having a TreeNode selected when I right click? I tried using the Click event, but the event does not pass in the node that was clicked. Currently you have to left click a node...
1
by: Boni | last post by:
Dear all, I have a question about TreeView elements. is it possible to differentate double click on TreeNode itself from double click on "+" of this TreeNode? Thanks in advance, Boni
5
by: Bob | last post by:
Hi, I have a treeview which contains nodes of a class (classA) derived from treenode. These classA nodes may contain nodes of a class (ClassB) derived from classA. The form load populates a...
3
by: Matthew Woods | last post by:
Hi, does anyone know how to select a treenode with the first click? the first click on a treeview will highlight the node under the mouse when it was clicked BUT that node isn't actually selected...
0
by: maflatoun | last post by:
Hi, I'm using asp:TreeView to display information on our website. I like to add a LinkButton that fires an event when clicked to the TreeNode. TreeNode childNode = new TreeNode("Download file...
0
by: mazdotnet | last post by:
Hi, I'm using asp:TreeView to display information on our website. I like to add a LinkButton that fires an event when clicked to the TreeNode. TreeNode childNode = new TreeNode("Download...
3
by: Ian Semmel | last post by:
How do you change the color of the selected item (ie clicked) in a TreeView control ?
0
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.