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

[Solved] Leaf node

1 Answer 140 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
GrZeCh
Top achievements
Rank 2
GrZeCh asked on 31 May 2008, 09:25 AM
Hello!

Is this possible to check in NodeDataBound event if node is leaf (last child in tree)?

I want to make leaf nodes as links and other nodes should have only expand possibility.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 02 Jun 2008, 03:34 PM
Hi GrZeCh,

The NodeDataBound event fires from parent to child Nodes. This means that in the event handler the child Nodes of the currently bound Node will still be undefined, therefore every Node will look like a leaf.

You should bind the TreeView and after this traverse through it identifying every Node that does not have child Nodes as a leaf.

Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
GrZeCh
Top achievements
Rank 2
Answers by
Simon
Telerik team
Share this question
or