How to find RadtreeViewItem By Source

2 posts, 0 answers
    ZIBING avatar
    1 posts
    Member since:
    Sep 2012

    Posted 05 Sep 2012 Link to this post

    I have the code as below:

    RadtreeView.Itemsource = sourceList1;
    foreache ( var item in sourceList1)
         if ( sourceList2.Where(o=>o.ID==item.ID).Count()>0)

    My question is how to find the RadtreeViewItem in RadtreeView from sourceList3.

    Thanks a lot

  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 10 Sep 2012 Link to this post

    Hello Zibing,

     You can use the RadTreeView.ItemContainerGenerator.ContainerFromItem method. However, this may be expensive. We highly suggest you to introduce a Path property in your business items and use the GetItemByPath method described here. Please let us know if you need further assistance.

    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top