简体   繁体   中英

Elegant filtering of DataGrid (WPF) in Entity Framework

I want this scenario:

  1. Using Entity Framework bind the DataGrid (WPF) to some collection of entities.
  2. Now, I would like to have one TextBox for each column and filter the rows online as user changes the TextBoxes' content.

So, specifically, data is loaded and bound only once. There would be around 1000 rows.

Thank you in advance! James

you could use ICollectionView.Filter to create your own filter.

look at this or this .

I know I may not be answering to your requirement directly but this may be of some help to you or your organization. Instead of developing something from scratch, you can use something that is already developed and tested. Have a look at DevExpress DxGrid or Filtering page here

Hope that helps. I have DevExpress controls in past and they are really awesome

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM