Hi!
I have a CollectionView from an ObservableCollection:
private static ObservableCollection<CalculationViewModel> _calculations;
CalculationViewModelsCollection = (CollectionView)CollectionViewSource.GetDefaultView(_calculations);
My problem is that, when the result of the filter is nothing, I'd like to clear the filter, and refilter with other conditions, but the collectionView is always empty. It is only if the filter's result is nothing.
I tried to reset the filter these ways:
CalculationViewModelsCollection.Filter = null;
CalculationViewModelsCollection.Refresh();
and
CalculationViewModelsCollection.Filter = delegate(object p)
{
return true;
};
None of them worked :( .
Could you give some advice how to reset a filter on a CollectionView?
Thanks in advance!
Regards, Zoli