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

TreeNode on select

Which event should I deal with when the user is selecting a node on the list
view ?
Jul 11 '06 #1
7 1704
Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)

{

}

So is the 'Sender' the node to be selected ?

"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Which event should I deal with when the user is selecting a node on the
list view ?

Jul 11 '06 #2
Use AfterSelect or BeforeSelect instead. They will both pass the item
affected
The sender event in all these events is the TreeView itself

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)

{

}

So is the 'Sender' the node to be selected ?

"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Which event should I deal with when the user is selecting a node on the
list view ?


Jul 11 '06 #3
How do I get the node which is selected from the sender ?
"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Use AfterSelect or BeforeSelect instead. They will both pass the item
affected
The sender event in all these events is the TreeView itself

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
>Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)

{

}

So is the 'Sender' the node to be selected ?

"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>Which event should I deal with when the user is selecting a node on the
list view ?



Jul 12 '06 #4
Use the TreeView property SelectedNode

/Lennart
"Alan T" <al*************@yahoo.com.auskrev i meddelandet
news:Or**************@TK2MSFTNGP03.phx.gbl...
How do I get the node which is selected from the sender ?
"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Use AfterSelect or BeforeSelect instead. They will both pass the item
affected
The sender event in all these events is the TreeView itself

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
>>Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)

{

}

So is the 'Sender' the node to be selected ?

"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
Which event should I deal with when the user is selecting a node on the
list view ?



Jul 12 '06 #5
You don't. Forget the sender and use the supplied
TreeViewEventArgs/TreeViewCancelEventArgs

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
How do I get the node which is selected from the sender ?
"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Use AfterSelect or BeforeSelect instead. They will both pass the item
affected
The sender event in all these events is the TreeView itself

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
>>Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)

{

}

So is the 'Sender' the node to be selected ?

"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
Which event should I deal with when the user is selecting a node on the
list view ?



Jul 12 '06 #6
Is this TreeViewEventArgs the selected node ?

"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:eV****************@TK2MSFTNGP03.phx.gbl...
You don't. Forget the sender and use the supplied
TreeViewEventArgs/TreeViewCancelEventArgs

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
>How do I get the node which is selected from the sender ?
"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>Use AfterSelect or BeforeSelect instead. They will both pass the item
affected
The sender event in all these events is the TreeView itself

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)

{

}

So is the 'Sender' the node to be selected ?

"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl. ..
Which event should I deal with when the user is selecting a node on
the list view ?
>




Jul 13 '06 #7
Yes. Read the docs

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:Od**************@TK2MSFTNGP04.phx.gbl...
Is this TreeViewEventArgs the selected node ?

"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:eV****************@TK2MSFTNGP03.phx.gbl...
>You don't. Forget the sender and use the supplied
TreeViewEventArgs/TreeViewCancelEventArgs

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
>>How do I get the node which is selected from the sender ?
"Claes Bergefall" <lo*****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
Use AfterSelect or BeforeSelect instead. They will both pass the item
affected
The sender event in all these events is the TreeView itself

/claes

"Alan T" <al*************@yahoo.com.auwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
Sorry, it should be a TreeView.
I found the event is
private void trvMain_NodeMouseClick(object sender,
TreeNodeMouseClickEventArgs e)
>
{
>
}
>
So is the 'Sender' the node to be selected ?
>
"Alan T" <al*************@yahoo.com.auwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .
>Which event should I deal with when the user is selecting a node on
>the list view ?
>>
>
>




Jul 13 '06 #8

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

Similar topics

3
by: scoobydoo | last post by:
Hello, I am trying to implement ICloneable's Clone() function, using Serialization. However, my code causes an exception. I have a class derived from TreeNode called "Node1". In Node1, I...
9
by: Mark Allison | last post by:
Hi there, I'm still very much a newbie to C#, and would like to derive from TreeNode to extend the TreeNode class. Here's test program: http://www.vkarlsen.no/pastebin/default.asp?id=4090 I...
2
by: Wes | last post by:
I have a treeview that I am continually added nodes to. Each time a new node is added I would like to select that node. Is this possible? I have looked at selectedNode, but I don't know how to...
1
by: Stefan | last post by:
Hey guys ! Can someone pls help me and tell me how it is possible to Select a Node in 2nd row? I got a treeview which is build like follows: node2.Nodes.Add("blah", "blubb");...
1
by: naijacoder naijacoder | last post by:
Hi Guys, I have an application below that is treeview menu populated from the database which works with asp.net webmatrix.But when i put it into code behind in Visual Studio.Net it gives the...
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: Jared | last post by:
I am using a TreeView with data stored in a database and have been trying to store a node index over a postback and re-select the node without using javascript. I couldn't find anything in these...
11
by: Alan T | last post by:
I am using VS 2005 and just wonder why I don't have this method?
4
by: jmDesktop | last post by:
I have searched everywhere and tried several things. I have a treeview with and want to be able to only select a parent node. For example: root //don't want to drag this -parent1 //yes, drag...
1
by: AAaron123 | last post by:
If you see this posted twice - sorry. My news reader showed my first post as "No Longer Available" I have the following in a .css file. The treeNodes behave as if they were "a" elements. ...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
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.