How to get destination node when Drop on the root

2 posts, 0 answers
  1. Hamdy
    Hamdy avatar
    41 posts
    Member since:
    Dec 2009

    Posted 03 Aug 2010 Link to this post

    I have treeview
    I am dropping a node to the root (no parent)
       var destinationNode = args.get_destNode();

     destinationNode has value and not a null
    but
     destinationNode.get_nodes().get_count() is equal zero
    how this make sense

    I want to do some validation before dropping so i wamt to know the children of the parent node
    in my case the parent should be null (as it is a root)

    to avoid this problem I will check the level and if it is zero I will check all the root noed but who can I get them?

  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 05 Aug 2010 Link to this post

    Hi Hamdy Ghanem,

    In the ticket info I see you are using the latest version 2010.2 713. There is a new property called get_allNodes(). When called from a node it will return all child nodes of a node. You can use it to find all the child nodes of the root node and then check the level of each of them as you want.

    Please let me know if this helps. 

    Greetings,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top