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

Auto refresh issue of telerikNavigation:RadTreeView when bound with List in silverlight

1 Answer 94 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Suman
Top achievements
Rank 1
Suman asked on 24 Dec 2012, 09:30 AM

My code snippet is like below.

<

 

 

telerikNavigation:RadTreeView x:Name="TestSectionsTreeView" SelectionMode="Single" Grid.Row="1"

 

 

 

ItemsSource="{Binding CurrentTest.Sections}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled"

 

 

 

AutomationProperties.AutomationId="AutomationProductsTreeView" ItemContainerStyle="{StaticResource RadTreeViewItemStyle}"

 

 

 

Background="{StaticResource ScreenBgBrush}" SelectionChanged="TestSectionsTreeView_SelectionChanged"

 

 

 

IsDragDropEnabled="False" IsDragPreviewEnabled="False" IsDragTooltipEnabled="False" IsDropPreviewLineEnabled="False" Style="{StaticResource RadTreeViewStyle}">

 

<

 

 

telerikNavigation:RadTreeView.ItemTemplate>

 

 

 

 

 

 

 

 

<telerikControls:HierarchicalDataTemplate ItemsSource="{Binding SubSections}"

 

 

 

 

 

 

 

telerikControls:ContainerBinding.ContainerBindings="{StaticResource SelectedItemsCollection}">

CurrentTest.Sections, Subsections are Generic Lists. If any item is changed of the lists that doesn't reflect in UI automatically. Please note, in our case we can't use ObservableCollections instead of Lists. Please help.

 

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 26 Dec 2012, 08:12 AM
Hello Suman,

When using RadTreeView control with Generic Lists directly the Property/CollectionChanged event is not fired and the UI will not be updated because it is not aware of that change. The only way to update the UI is to fire one of these events. In order to overcome your issue you can wrap your Generic List in an INotifyCollectionChanged interface and fire the CollectionChanged event on any CRUD operation. For more information you can read this thread.

Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TreeView
Asked by
Suman
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or