Access the node that was clicked on with in a TreeView control 
Author Message
 Access the node that was clicked on with in a TreeView control

I have an application that I have inserted a TreeView controll into the
client side. Using VisualInterdev I indicate that I want to handle the
'NodeClick' event. This generates a VBScript template that does not include
an argument.
My question is how to I access the node that was clicked on? When I click on
a node the function gets called, I just don't know what to do from there.

Thank you.

Kevin Burton




Sat, 08 Feb 2003 03:00:00 GMT  
 Access the node that was clicked on with in a TreeView control

Well I found my answer. With VBScript you just and an argument to the
supplied template:

TreeView_NodeClick(node)

With JavaScript there are two script blocks that need to be modified. The
first unamed script block will look something like:

TreeView_NodeClick();

I just changed this to

TreeView_NodeClick(arguments[0]);

Then I add the argument to the called function like:

TreeView_NodeClick(node){ alert(node.text); }

Hopefully I did not break any rules, but this seems to work, which is all
that is important for now.

Kevin


Quote:
> I have an application that I have inserted a TreeView controll into the
> client side. Using VisualInterdev I indicate that I want to handle the
> 'NodeClick' event. This generates a VBScript template that does not
include
> an argument.
> My question is how to I access the node that was clicked on? When I click
on
> a node the function gets called, I just don't know what to do from there.

> Thank you.

> Kevin Burton




Mon, 10 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. TreeView Control and Node Click

2. Treeview: highlight node with control Click event

3. TreeView-Control, activate Node with right mouse click

4. Double clicking a Node in the Treeview Control

5. TreeView control within a web page is missing the text nodes

6. TREEVIEW Ctrl :detecting if a node has been selected/clicked

7. No node click event in Windows.Forms.TreeView?

8. TreeView -Click Event on Plus Sign Node

9. Right Click Treeview Doesnt Select Node

10. Treeview - detecting click on node icons

11. Right mouse click on Treeview Node

12. Right mouse click on Treeview Node

 

 
Powered by phpBB® Forum Software