I am binding RadTreeView with an observable collection and following is the HeirarchicalDataTemplate:
<HierarchicalDataTemplate DataType="{x:Type amms:Node}" ItemsSource="{Binding Children}" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=NodeText, Mode=TwoWay}"
Visibility="{Binding Path=IsEditCompleted, Converter={StaticResource boolToVisibleConverter}, Mode=TwoWay,
NotifyOnTargetUpdated=True}" TargetUpdated="uxTextBlock_TargetUpdated">
</TextBlock>
</StackPanel>
</HierarchicalDataTemplate>
When I initially set the RadTreeView's datacontext, binding defined in HierarchicalDataTemplate works well for all the rendered items
textblock visibility changes as IsEditCompleted changes and uxTextBlock_TargetUpdated also hits.
But when i add an item to observable collection "Children", it is being rendered in the RadTreeView at proper position but IsEditCompleted changes and uxTextBlock_TargetUpdated does not get hit. It looks like binding is not set up properly for newly added item via observable collection.
Please check the issue and let me know if it is a known issue and if there is any workaround.
Thanks
Sonal
<HierarchicalDataTemplate DataType="{x:Type amms:Node}" ItemsSource="{Binding Children}" >
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=NodeText, Mode=TwoWay}"
Visibility="{Binding Path=IsEditCompleted, Converter={StaticResource boolToVisibleConverter}, Mode=TwoWay,
NotifyOnTargetUpdated=True}" TargetUpdated="uxTextBlock_TargetUpdated">
</TextBlock>
</StackPanel>
</HierarchicalDataTemplate>
When I initially set the RadTreeView's datacontext, binding defined in HierarchicalDataTemplate works well for all the rendered items
textblock visibility changes as IsEditCompleted changes and uxTextBlock_TargetUpdated also hits.
But when i add an item to observable collection "Children", it is being rendered in the RadTreeView at proper position but IsEditCompleted changes and uxTextBlock_TargetUpdated does not get hit. It looks like binding is not set up properly for newly added item via observable collection.
Please check the issue and let me know if it is a known issue and if there is any workaround.
Thanks
Sonal