Reputation: 3
Can someone help with the following:
CollectionView.Filter = m => ((Customer)m).Name.ToLower().Contains(_lastNameFilter);
Instead of looking up name, I'd to search DateAdded = _filterDate
Upvotes: 0
Views: 87
Reputation: 8431
With the assumption that _filterDate
is a string and DateAdded
a Date
CollectionView.Filter = m => ((Customer)m).DateAdded == DateTime.Parse(_filterDate);
Upvotes: 1
Reputation: 245489
It looks like it should be:
CollectionView.Filter = m =>
((Customer)m).DateAdded == DateTime.Parse(_filterDate);
Upvotes: 1
Reputation: 174457
I don't know how CollectionView.Filter
works, but why don't you just use this:
CollectionView.Filter = m => ((Customer)m).DateAdded == _filterDate;
Upvotes: 2