Location of Each Node

2 posts, 0 answers
  1. Erik
    Erik avatar
    80 posts
    Member since:
    Jul 2007

    Posted 16 Jul 2008 Link to this post

    Dear telerik,

    Before expanded or after expanded, the location of each node will be different.  So how do i know the location of nodes in (x,y)?

  2. Jordan
    Jordan avatar
    547 posts

    Posted 18 Jul 2008 Link to this post

    Hello Erik,

    I would suggest you try something like this:
    public Point GetNodeLocation(RadTreeNode node) 
                foreach (TreeNodeUI treeNodeUI in this.radTreeView1.TreeViewElement.Items) 
                    if (treeNodeUI.AssociatedTreeNode == node) 
                        return treeNodeUI.Location; 
                return Point.Empty; 

    You should note, however, that if the node is not currently shown you will get Point.Empty as result.

    Don't hesitate to contact me if you have further questions.

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top