TreeListView set selected item mvvm

2 posts, 0 answers
  1. markus
    markus avatar
    2 posts
    Member since:
    Mar 2009

    Posted 26 Mar 2012 Link to this post

    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" />
    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
  2. Maya
    Maya avatar
    4062 posts

    Posted 26 Mar 2012 Link to this post

    Hello  Markus,

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

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top