TreeView set child not to accept children

2 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    1 posts
    Member since:
    Jun 2013

    Posted 08 Jun 2016 Link to this post

    I have a situation where the data coming in because of the data coming from two separate tables can have the same ID. The ID is mapped to the NodeID (DataFieldID) of the tree view. Because of this I can have two nodes with the same id.  Instead of changing my data model converting the ID (int) to a ID (GUID) I would like to see if there is a mechanism in the TreeView where I can check to see if when adding a node check to see if the parent node is accepting a child or not. The below structure represents my tree structure.


    When tree evaluates Node 75 with ParentID 37, I want it at the bottom node as it’s a folder vs the first 37 as it not a node that can have children.

    NodeID  75

    ParentID 37




    NodeID 18

    ParentID  null


           NodeID 69           

           ParentID  18 


           NodeID 56      

           ParentID 18


           NodeID  37 ß I don’t want it here

           Parent 18



           NodeID  1

           Parent 18


           NodeID  12

           Parent 18


           NodeID  26

           Parent 18



           NodeID 37  ß I want it here

           ParentID 18



    Is there an event I can write code for to interrogate the node to see if I can add a child?

  2. Ivan Danchev
    Ivan Danchev avatar
    1617 posts

    Posted 14 Jun 2016 Link to this post

    Hello Ricardo,

    I replied to your inquiry in the other thread you started in the ticketing system with the same subject. If you have other questions I suggest we continue the discussion in it, in order to avoid having duplicate threads. 

    Ivan Danchev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top