DTO 的 DataGridView 主从?

发布于 2024-07-25 16:07:33 字数 174 浏览 4 评论 0原文

在我的 Windows 窗体应用程序中,我有两个代表主从关系的 DataGridView。 每个数据源都是一个数据传输对象,表示为 IList(of T)——因此 DataRelation 已经消失。 驱动主从网格的最佳方式是什么? .NET 中是否有内置方法可以执行此操作,或者当选定的主行更改时我是否必须编写自己的重新绑定?

In my Windows Forms app, I two DataGridViews that represent a Master-Detail relationship. The datasource for each is a Data Transfer Object, represented as an IList(of T) -- so DataRelation is out. What is the best way to drive the master-detail grids? Is there a built-in way to do this in .NET or do I have to write my own rebind when the selected master row changes?

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

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

发布评论

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

评论(1

千里故人稀 2024-08-01 16:07:33

处理主网格上的 rowenter 事件。
手动填充详细信息网格或更新数据源并重新绑定。

Process the rowenter event on the master grid.
Populate the details grid manually or update the datasource and rebind.

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