This is a migrated thread and some comments may be shown as answers.

"Leaf" Nodes

1 Answer 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 09 Nov 2010, 02:48 PM
I have a RadTreeView control that runs a function on the onclientnodeclicked event.  I do not want the code in the function to be executed unless the node is a "leaf" (a node with no children).  How do I accomplish this?

1 Answer, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 09 Nov 2010, 04:34 PM

 

Figured this out...

While building the tree recursively I use the following two lines (instead of using the onclientnodeclicked event) :

childNode.Attributes.Add("onclick", "theTreeNodeClicked('" & dr("ID") & "')") 
parentNode.Attributes.Remove("onclick")



Tags
TreeView
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
Share this question
or