实体框架中 DataGrid (WPF) 的优雅过滤
我想要这样的场景:
- 使用实体框架将 DataGrid (WPF) 绑定到某些实体集合。
- 现在,我希望每一列都有一个文本框,并在用户更改文本框内容时在线过滤行。
因此,具体而言,数据仅加载和绑定一次。大约有 1000 行。
先感谢您! 詹姆斯
I want this scenario:
- Using Entity Framework bind the DataGrid (WPF) to some collection of entities.
- 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 ICollectionView.Filter 创建您自己的过滤器。
看看这个或这个。
you could use ICollectionView.Filter to create your own filter.
look at this or this.
我知道我可能不会直接回答您的要求,但这可能对您或您的组织有一些帮助。您可以使用已经开发和测试过的东西,而不是从头开始开发东西。查看 DevExpress DxGrid 或过滤页面 此处
希望有所帮助。我过去有 DevExpress 控件,它们真的很棒
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