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

2 posts, 0 answers
  1. Suman
    Suman avatar
    1 posts
    Member since:
    Dec 2012

    Posted 24 Dec 2012 Link to this post

    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}">














    <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.


  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1236 posts

    Posted 26 Dec 2012 Link to this post

    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.

Back to Top