user2565505
user2565505

Reputation: 21

Xamgrid refresh or reapply filters

Is there some way to reapply the filter without having to reselect the filter? Especially when the underlying observable collection is changed? I seem to have records which don't match the filter condition after a while..

Upvotes: 2

Views: 2757

Answers (2)

Koynov
Koynov

Reputation: 1519

You could try calling the InvalidateData method of the XamGrid class - it is supposed to invalidate all data operations like grouping, sorting and filtering.

Upvotes: 0

rstoffers
rstoffers

Reputation: 156

The XamGrid doesn't have a method to refresh. The INotifyCollectionChanged events are supposed to handle updating the grid accordingly.

You could try programmatically removing the current filters that are set and then readd them. It's a little tough for me to know if this will solve your issue though as I don't have a sample that reproduces the issue.

You could also try deriving from ObservableCollection and implement a refresh method. Inside the refresh method you could call OnCollectionChanged and pass in a Reset action. This might refresh the XamGrid.

Upvotes: 1

Related Questions