I need to select an item in the tree and I am using ItemSource to generate the elements on the tree so I do not have a reference to the node.
I tried to use this example but IsSelected in my view model is not set or retreived:
http://www.telerik.com/forums/radtreeview-selecteditem-binding
My code:
<telerik:RadTreeListView x:Name="treeFileSystem" IsBusy="{Binding IsBusy}" RowIndicatorVisibility="Collapsed"
IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding FoldersOnDemand, IsAsync=True}" IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}"
AutoExpandItems="False" Grid.Row="0" SelectionChanged="treeFileSystem_SelectionChanged">
<telerik:RadTreeListView.ItemContainerStyle>
<Style TargetType="telerik:RadTreeViewItem">
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
</Style >
</telerik:RadTreeListView.ItemContainerStyle>
What it the correct approach to select the item in the tree? I know the full path and I know which item it is in the view model.
Thanks