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

selecting the new created item in treeview while working with databinding

1 Answer 27 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hussein
Top achievements
Rank 1
Hussein asked on 10 Jan 2012, 12:45 PM
I am working with treeview with DataBinding to an object in the view model, when creating a new item in the tree it is created but it is not highlighed or selected. What I did, is to add the new created object to the collection in the view model which treeview bind on it. and its successfully added and also appeared on the screen but its not selected.

Any Advice?
Thanks;

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 13 Jan 2012, 09:54 AM
Hello Hussein,

If I understand your scenario correctly you need to select the item that is added. If this is the case, then I'd suggest you to bind the RadTreeViewItems IsSelected property to a business property from your view model. This article demonstrates such an approach and I hope it will help you get started on implementing your requirements.

If you need more info, please let us know.

Kind regards,
Tina Stancheva
the Telerik team

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

Tags
TreeView
Asked by
Hussein
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or