C#寻找datagridview的替代方案,以连续显示用户控件。 [英] C# Looking for alternative to datagridview to display user controls in succession.

查看:367
本文介绍了C#寻找datagridview的替代方案,以连续显示用户控件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在编写一个C#.NET WinForms应用程序,我必须在其中创建一个用户控件的新实例,它将包含多个控件(TextBox,Button,CheckBox等) )。必须一次创建一个用户控件并堆叠(垂直排列)。

I'm writing a C# .NET WinForms app in which I have to create a new instance of a user control, which will contain several controls (TextBox, Button, CheckBox, etc.). The user controls must be created one at a time and stacked (arranged vertically).

我尝试的选项:

FlowLayoutPanel 没有我可以使用的索引值用于跟踪用户点击"添加新项目"时将添加的许多用户控件。按钮。

FlowLayoutPanel doesn't have an index value that I can use to keep track of the many user controls that will be added when the user clicks the "Add New Item" button.

DataGridView 没有适合用户控件的列类型。虽然DataGridView的功能更接近我的需要,但我没有找到任何代码来添加UserControl类型的列。

DataGridView doesn't have a column type to accommodate a user control. While the DataGridView's functionality is much closer to what I need, I haven't found any code to add a column of type UserControl.

任何想法?

推荐答案

您好WikiGrrrl,

Hi WikiGrrrl,

此论坛讨论并询问有关.NET Framework基类的问题,因为您的问题与Winform更相关,我们将把线程移到winform论坛以获得合适的支持。

This forum discusses and asks questions about .NET Framework Base Classes, Since your issue is more related to Winform, we'll move the thread to winform forum for suitable support.

感谢您的理解。

祝你好运,

Cole Wu


这篇关于C#寻找datagridview的替代方案,以连续显示用户控件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆