如何在 C# 表单应用程序中的另一个 datagridview 的单元格中显示 DataGridView?

发布于 2024-09-01 02:28:57 字数 184 浏览 1 评论 0原文

如何在 C# 表单应用程序中的另一个 datagridview 的单元格中显示 DataGridView?

我将如何处理排序和排序?如果可能的话,价值会改变吗?

这是我可以显示数据以使其有意义的唯一方法。可以将其想象为我有一个任务列和日期列。在日期栏下,我列出了要做的事情。这些日期列是动态的并且是动态的。可能有多个日期列

How do I display a DataGridView within a cell of another datagridview in C# forms app?

How would I have to handle Sorting & value changed if this possible?

That is the only way I can display data to make some sense.. Think of it like I have a task column and dates column. Under the dates column I have a list of things to be done. These date columns are dynamic & there might be multiple date columns

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

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

发布评论

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

评论(3

生生漫 2024-09-08 02:28:57

这听起来像是一个很难使用的界面,您是否考虑过某种树控件?

如果您决定使用数据网格视图,请查看自定义数据网格视图列和细胞。您需要为所需的列和单元格行为声明自定义子类。我不知道是否可以做你想做的事,但这就是我要开始的地方。

That sounds like a difficult interface to use, have you considered some kind of tree control?

If you're determined to use data grid views, look at customizing data grid view columns and cells. You need to declare custom subclasses for the column and cell behaviour that you want. I don't know if it's possible to do what you want, but that's where I would start.

海的爱人是光 2024-09-08 02:28:57

这是一个建议,因为我认为您的要求对于 .NET 的内置 DGV 来说是不可能的。

使用专业公司制作的自定义控件,为 DataGrid 提供分层数据的功能。例如,一行可以扩展以显示多个条目(多个条目甚至可以是包含完全不同的列的完全不同的表)。您可以查看以下几个选项。

Infragistics WinGrid

组件一

还有一些其他地方/公司制作了出色的 .NET 组件包,为现有 .NET 组件提供了附加功能。

This is a suggestion since what your asking I do not think is possible with the built in DGV of .NET.

Using custom controls made by professional companies that provides a DataGrid with the capability of hierarchical data. For example a row can be expanded to show multiple entries (the multiple entries can be an entirely different table containing completely different columns even). Here are a few options that you can check out.

Infragistics WinGrid

Component One

There are a few other places/companies that make great .NET component packages that provide added features to the existing .NET components.

岁吢 2024-09-08 02:28:57

http://blogs.msdn.com/markrideout/archive/ 2006/01/08/510700.aspx

找到了实现分层数据网格的链接。

现在,我必须修改控件,或者满足分层网格视图!

希望这对某人有帮助。稍后会更新

http://blogs.msdn.com/markrideout/archive/2006/01/08/510700.aspx

Found a link where hierarchichal datagrid is implemented.

Now, I have to either modify the control, or settle for hierarchichal gridview!

Hope this helps someone. Will update later

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