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

TreeListView set selected item mvvm

1 Answer 86 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
markus
Top achievements
Rank 1
markus asked on 26 Mar 2012, 01:25 PM
Hello,
i want to programmatically set the selected item in a treelistview. I use a containerbinding like that:

        <telerik:ContainerBindingCollection x:Key="TreeViewItemContainerBinding">
            <telerik:ContainerBinding Binding="{Binding Path=IsActive,Mode=TwoWay}" PropertyName="IsExpanded" />
            <telerik:ContainerBinding Binding="{Binding Path=IsActive}" PropertyName="IsSelected" />
        </telerik:ContainerBindingCollection>
The items are hierachical and therefore i use childtabledefinitions. I calculate the child parents and set them to IsActive = true and then activate the child itself. Unfortunately this doesn't work and nothing is selected.

Could you please post some sample code, how to select plus expand a item in a treelistview in mvvm?

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 26 Mar 2012, 03:56 PM
Hello  Markus,

Please take a look at this forum thread for a reference.  

Regards,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
TreeListView
Asked by
markus
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or