This is a migrated thread and some comments may be shown as answers.

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

1 Answer 46 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
PEIYANG
Top achievements
Rank 1
PEIYANG asked on 10 Jul 2012, 09:37 AM
 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...

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 12 Jul 2012, 11:48 AM
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 >>

Tags
TreeView
Asked by
PEIYANG
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or