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

GridView items not refreshing when the GridView is sorted or filtered

1 Answer 15 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tanja
Top achievements
Rank 1
Tanja asked on 18 Mar 2014, 10:47 AM
Hi,

We are using a GridView in .Net 4.5 WPF application.

We have a GridView with items bound to an instance of a class which is implementing INotifyPropertyChanged.

All changes to data are correctly displayed when the GridView is unsorted and unfiltered.
However, if the GridView is either sorted or filtered, the data is not refreshed until the next sort when all the changes made in the meantime appear correctly.

Any help or ideas as to how we could fix this would be greatly appreciated.

Regards,
Tanja

1 Answer, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 19 Mar 2014, 01:56 PM
Hi Tanja,

Actually, this behavior is the expected one. You will get the same result with MS DataGrid.
The sorting/filtering will be automatically re-applied when the bound source collection raises CollectionChanged event. As this event does not fire when an item of the collection is edited, you have the following options:
1. to call RadGridView.Rebind() method
2. to remove the item you want to edit from the collection and to add it back once it is edited. This way CollectionChanged event will be raised.
3. To simulate edit in the GridView.

I hope this helps.

Regards,
Vera
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
GridView
Asked by
Tanja
Top achievements
Rank 1
Answers by
Vera
Telerik team
Share this question
or