TreeListView will not refresh

2 posts, 0 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 19 Feb 2012 Link to this post

    I am using 2011 Q3

    I have following TreeListView:

    <telerik:RadTreeListView x:Name="FileView" ItemsSource="{Binding FileDialogObjects, Mode=TwoWay}" AutoGenerateColumns="False">                               
                                    <telerik:RadTreeListView.Columns>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" ColumnGroupName="Name" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ModificationDate}" ColumnGroupName="Date Modified" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Type}" ColumnGroupName="Type" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Size}" ColumnGroupName="Size" />
                                    </telerik:RadTreeListView.Columns>
                                </telerik:RadTreeListView>

    Filedialogobjects is a collection in code behind, that is bound to the form using following statement:

     

    this.DataContext = this;

    This is the collection property

    public System.Collections.Generic.List<FileDialogObject> FileDialogObjects {get; set;}

     

    When i load the content of the collection on form load all is fine:

    LoadFolder(new TreeFolder() { Path = @"c:\" });

    When i want to load files from a different folder, then the routine is executed perfectly, the collection is populated, but the TreeListView still displays the old data.

    Why is the treelistview not refreshing it's data?

    Even clearing the FileDialogObjects collection is not working.

    What am i missing here?

     

     




  2. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 19 Feb 2012 Link to this post

    Nevermind... seems the collection type needs to ObservableCollection or it will not see the changes to the collection
  3. DevCraft banner
Back to Top