how to get the RadTreeViewItem's parent and child item?

2 posts, 0 answers
  1. PEIYANG
    PEIYANG avatar
    65 posts
    Member since:
    Jul 2012

    Posted 10 Jul 2012 Link to this post

     foreach(var item in radTreeView.CheckedItems)
                {
                    if (item is RadTreeViewItem)
                    {
                         RadTreeViewItem rtv = item as RadTreeViewItem;
                         if (rtv.ParentItem == null && rtv.childItem==null)
                         {
                             foreach (RadTreeViewItem subItem in rtv.Items)
                                 i++;


                         }
    }

    I write the code above,  but rtv.childItem is wrong...
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 12 Jul 2012 Link to this post

    Hi PEIYANG,

    I hope the information in the other forum thread will help you proceed further. If not, we would highly appreciate if you can elaborate on your exact requirements. This way we would be better able to advice you.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top