如何获取 PagedCollectionView 内组内的项目?

发布于 2024-12-25 22:54:47 字数 273 浏览 2 评论 0原文

我有一个 PagedCollectionView,但它的 Groups 属性不会公开有关每个组的任何信息,例如 PagedCollectionView 中的哪些项目在该组内,这是我需要知道的信息..

我想做像这样的东西:

(System.Windows.Data.CollectionViewGroupInternal)pcv.Groups[0].Items;

似乎这是在内部类中保存的,并且无法从客户端代码中获取。还有其他方法可以获取这些信息吗?

I have a PagedCollectionView, but the Groups property on it doesn't expose any information about each group, such as which of the items in the PagedCollectionView are within that group, which is information I need to know..

I'd like to do something like this:

(System.Windows.Data.CollectionViewGroupInternal)pcv.Groups[0].Items;

It seems that this is held within an internal class, and is not obtainable from client code. Is there another way to get this information?

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

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

发布评论

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

评论(1

诺曦 2025-01-01 22:54:47

事实证明,使用 DataGrid 的公共接口完全不可能实现这个简单的功能。令人惊讶的是,这个基本功能在这个网格中已经缺失多年了。

It turns out that this simple feature is completely impossible using the public interfaces of the DataGrid. Simply amazing that this basic feature has been missing for years in this grid.

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