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

isExpanded binding does not work

1 Answer 103 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 20 Sep 2010, 01:46 PM
I am trying to binf isExpanded property, but the nodes dont expand on tree load ... xaml content:

 

 

<UserControl.Resources
    
<telerik:ContainerBindingCollection x:Name="BindingsCollection"
            <telerik:ContainerBinding PropertyName="IsExpanded" Binding="{Binding Expanded, Mode=TwoWay}"/> 
            <telerik:ContainerBinding PropertyName="IsSelected" Binding="{Binding Selected, Mode=TwoWay}"/> 
        </telerik:ContainerBindingCollection
    
        <telerik:HierarchicalDataTemplate x:Key="test" ItemsSource="{Binding Children}" 
                        telerik:ContainerBinding.ContainerBindings="{StaticResource BindingsCollection}"
            <TextBlock Text="{Binding DisplayName}"/> 
        </telerik:HierarchicalDataTemplate
    
        <telerik:HierarchicalDataTemplate x:Key="Children" ItemsSource="{Binding Children}" 
                        telerik:ContainerBinding.ContainerBindings="{StaticResource BindingsCollection}"
                <TextBlock Text="{Binding DisplayName}" /> 
        </telerik:HierarchicalDataTemplate
    
</UserControl.Resources
    
    
<localcontrols:RadTreeView IsLineEnabled="True" IsEditable="False" 
                    Grid.Row="0" Grid.Column="0" MinWidth="300"
                    x:Name="TreeListView" Background="White" 
                                                   ItemTemplate="{StaticResource test}"
                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    IsExpandOnSingleClickEnabled="False"
                    IsExpandOnDblClickEnabled="True"
                    SelectionChanged="TreeListView_SelectionChanged"
                    Expanded="TreeListView_Expanded"
                    PreviewExpanded="TreeListView_PreviewExpanded"
                    IsLoadOnDemandEnabled="True"
                    LoadOnDemand="TreeListView_LoadOnDemand"/>

 

 

 


Thanks

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 23 Sep 2010, 12:02 PM
Hi Alex,

 Can you check this online example. It is doing exactly that. If you still have issues with - it will be easier for us to find the problem, if you send us example project, demonstrating it.
Thank you for your cooperation.

Greetings,
Miro Miroslavov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeListView
Asked by
Alex
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or