cheks place a TreView

2 posts, 1 answers
    ALBERT avatar
    38 posts
    Member since:
    Dec 2010

    Posted 19 Sep 2012 Link to this post

    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
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Sep 2012 Link to this post

    Hi Albert,

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

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

  3. Telerik UI for ASP.NET Core is out
Back to Top