TreeNodeUI of RadTreeNode

2 posts, 0 answers
  1. Zaven Adamyan
    Zaven Adamyan avatar
    2 posts
    Member since:
    Feb 2010

    Posted 19 Jun 2010 Link to this post


    Is there way to get TreeNodeUI of RadTreeNode?
    The code below works only for root nodes, because TreeViewElement.Items returns only root items.


    private TreeNodeUI FindNodeUI(RadTreeNode node)




    TreeNodeUI result = null;



    if (node != null)




    foreach (TreeNodeUI item in node.TreeView.TreeViewElement.Items)




    if (item.AssociatedTreeNode == node)



    result = item;








    return result;



  2. Victor
    Victor avatar
    1349 posts

    Posted 24 Jun 2010 Link to this post

    Hello Zaven Adamyan,

    Thank you for writing.

    Finding the TreeNodeUI associated with a RadTreeNode is not possible for every RadTreeNode, because RadTreeView has UI virtualization. There is a fixed number of TreeNodeUI objects that are translated and associated dynamically as the user scrolls the view, therefore you can not get a UI element for a RadTreeNode that is not currently visible.

    Please specify what your goal is so that I may provide a suggestion if possible.

    Sincerely yours,
    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
  3. DevCraft banner
Back to Top