如何在单个数据网格 Windows Forms .Net 中显示父子关系

发布于 2024-07-27 05:11:20 字数 57 浏览 2 评论 0原文

我需要知道是否有一种方法可以在 Windows 窗体 .Net C# 中的单个数据网格中显示父子关系

I need to know is there a way to dispaly parent-child relation in a single datagrid in Windows Forms .Net C#

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

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

发布评论

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

评论(2

小镇女孩 2024-08-03 05:11:20

经过一番谷歌搜索后,我在 msdn 论坛上发现了一篇帖子,他们在其中寻找相同的功能。

基本上,您可以做的就是在数据网格的模板列中托管一个数据网格视图。

您可以在这里找到这篇文章: http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244f

After a little bit of googling I came up with a post on the msdn forums where they where looking for the same functionality.

Basically what you can do is host a datagridview inside a templatecolumn of your datagrid.

you can find this post here: http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244f

还不是爱你 2024-08-03 05:11:20

不在单个数据网格中 - 您需要使用嵌套的转发器/数据列表/列表视图,以便在绑定父行时绑定子行。

Not in a single datagrid - you need to use a nested repeater / datalist / listview in order to bind the child rows when the parent row is bound.

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