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

Treeview MVVM IsSelected not working...

1 Answer 98 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Tolga
Top achievements
Rank 1
Tolga asked on 04 Jul 2011, 01:49 AM
Hello:

I am using a RadTreeView inside a MVVM Silverlight project. I am setting the IsSelected property in my viewmodel, but the TreeView does not automatically display (or brings to front) the selected item. If I expand the parent folder then it shows the item selected. How can I make this work?
Thanks

--tolga

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 06 Jul 2011, 05:56 PM
Hi Tolga,

This is expected behavior of the RadTreeView. In order to "bring this item into view", you can bind the IsExpanded property of the RadTreeViewItems via ContainerBindings and set the corresponding boolean property in the ViewModel to true for all parent items of the selected one.
Another solution uses the BringItemIntoView series of methods. For further info on this, you can check out this help article.

Best wishes,
Petar Mladenov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

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