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

TreeListView will not refresh

1 Answer 68 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 19 Feb 2012, 07:56 AM

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?

 

 




1 Answer, 1 is accepted

Sort by
0
HDC
Top achievements
Rank 1
answered on 19 Feb 2012, 08:22 AM
Nevermind... seems the collection type needs to ObservableCollection or it will not see the changes to the collection
Tags
TreeListView
Asked by
HDC
Top achievements
Rank 1
Answers by
HDC
Top achievements
Rank 1
Share this question
or