0
質問があります。私は、WPFのボタンとデータグリッドと結合された非常にシンプルである改ページメカニズムを持っている、そしてそれは次のようになります。CollectionViewSourceでフィルタリングした後のページ番号
public CatalogViewModel()
{
this._catalog = new CatalogContexct();
DbQuery<Candidate> candidatesValues = this._catalog.Candidates.Include("commendation");
this._totalItems = candidatesValues.Count();
this._candidates = candidatesValues.ToArray()
.OrderBy(c => c.Firstname).Skip(this.Start).Take(this._itemCount).ToList();
this._filters = new Dictionary<string, Predicate<Candidate>>();
var candidates = new ListCollectionView(this._candidates);
this.CandidateView = CollectionViewSource.GetDefaultView(candidates);
this.FirstameCommand = new RelayCommand(FilterFirstname, param => this._canExecute);
this.LastnameCommand = new RelayCommand(FilterLastname, param =>
CandidateView.Filter = FilterCandidates;
//should be something else to limit view to page so filter can be done on whole source not only part of it like above
}
しかし、私が説明するように、私はpaginatio前に値をフィルタリングしたり、本のフィルタリングされた値をページ付けする必要があります。 CandidateView = CollectionViewSource.GetDefaultView(候補);
が可能ですか?
コレクションを手動でフィルタリングしてその値を渡すと、私は無理でしょうが、手動でデータを操作する簡単な方法があるのだろうかと思います。