WPF 工具包 DataGrid - 仅查找可见/当前可查看的行
我正在使用 WPF 工具包的 DataGrid 来显示一组搜索结果。根据我的其他问题中的场景我希望能够为数据网格中的每个可查看(即在可见滚动区域内)行预取辅助结果。
我希望能够:
- 查询“可查看”行
- 当行变得可见时引发事件(通过垂直滚动)
注意: 可能重复? [但没有经过验证的答案/结果] - 有人有任何链接/代码示例来实现此目的吗?
I'm using the WPF Toolkit's DataGrid to display a set of search results. As per then scenario in my other question I want to be able to pre-fetch secondary results for each of my viewable (that is, within the visible scroll area) rows in the datagrid.
I want to be able to:
- Query "viewable" rows
- Raise an event when rows become visible (via vertical scrolling)
NOTE: Possible duplicate? [But without validated answer/outcome] - Anyone have any links/code samples to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我之前看过这个并没有找到解决方案。
您正在谈论数据虚拟化,虽然我还没有找到一种使用 wpf datagrid 来实现这一点的方法,但它可以通过 xceed grid pro 版本(内置)轻松使用,这里是您可以构建的另一个解决方案,使用它们的实现,您可以构建一个模型,该模型知道已加载/请求哪些行并从那里开始工作。
I have looked at this previously and have not found a solution.
You are talking about data virtualization, while i havent found a way to do it with the wpf datagrid it is readily available with the xceed grid pro version(built in), here is another solution that you could build on, using their implementation you could build a model that knows which rows have been loaded/requested and work from there.