支持 linq 过滤的 WPF ObjectDataProvider?

发布于 2024-08-11 03:51:27 字数 263 浏览 5 评论 0原文

是否有支持“Where”的 WPF ObjectDataProvider 我的意思是像在 asp.net 中一样,可以选择拥有支持定义结果的数据提供程序?

我实际上需要的是两个组合框,当我在第一个组合框中选择一个值时,它会限制第二个组合框。 假设我有一个父表类别和一个子表组。我希望当用户在类别组合框中选择一个值时,组中的值应该仅在 Group.CategoryId = [所选类别 Id] 处。

请注意,我正在谈论 wpf 工具包 DataGridComboBoxColumn。

Is there an WPF ObjectDataProvider that supports "Where" I mean like in asp.net there is an option to have a dataprovider that supports defining the results?

What I actually need is two ComboBoxes that when I choose a value in the first it limits the second one.
Say I have a parent table Category and a child table Group. I want that when the user chooses a value in the category combo box, the values in the group should be only where Group.CategoryId = [Selected category Id].

And notice that I am talking about wpf toolkit DataGridComboBoxColumn.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人生百味 2024-08-18 03:51:27

答案是:是的,CollectionViewSourceFilter 事件,并且可以通过调用它的 View.刷新方法。

(答案来源)

The answer is: Yes, CollectionViewSource that has Filter event, and can be explicitly refreshed by calling it's View.Refresh method.

(Answer credit)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文