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

[Solved] manually add items and LoadOnDemand

1 Answer 110 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
james
Top achievements
Rank 1
james asked on 13 Dec 2008, 03:13 AM
I need to manually add items(root level) to a treeview, and add sub items on demand.

I could use FooTreeView.Items.Add to add the root level items, but I could not find a way to add those items by declaring them as load on demand, lets say:

FooTreeView.Items.Add(BizObject);

it does not return RadTreeViewItem.

in another word, how to find RadTreeViewItem by BizObject?

1 Answer, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 18 Dec 2008, 12:15 PM
Hello james,

In order to get the RadTreeViewItem instance from the bussiness object you can use the RadTreeView method:

RadTreeViewItem myItem = RadTreeView1.ContainerFromItemRecursive(bizObject);


Best wishes,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
james
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Share this question
or