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

cheks place a TreView

1 Answer 31 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
ALBERT
Top achievements
Rank 1
ALBERT asked on 19 Sep 2012, 04:34 PM
Good day,

I have the following drawbacks: I have a RadTreeView check where I put them, but the only ones that should be checked are the last level records. the RadTreeView is populated dynamically, it is not known how many levels you may have.

I wonder how I can determine when performing bone click a node in the event "OnNodeClick" if you are in the last level?
and searches for node propiedas this event but I can only determine who the father but not if you have children.

Thanks for your help

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 20 Sep 2012, 04:20 AM
Hi Albert,

Please try the following code to check whether the clicked node has child nodes.

C#:
protected void RadTreeView1_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
{
 if (e.Node.Nodes.Count == 0)
 {
   Response.Write("Last Level");
 }
}

Thanks,
Princy.
Tags
TreeView
Asked by
ALBERT
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or