用户控件表单中的Datagridview [英] Datagridview in usercontrol form

查看:77
本文介绍了用户控件表单中的Datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道datagridview是否在用户控件表单中工作,因为我已经完成了它但它似乎没有加载,我还有其他6个Windows表单,它完美运行。



我创建了一个用户控件表单,并插入了一个datagridview并选中了我希望在表格中查看的数据



是否有可能?我用谷歌搜索了它,但没有太多信息



我尝试过:



在Windows窗体中尝试 - 使用C#网站没有太多信息

I was wondering if datagridview works in a usercontrol form, as I've done it but it doesnt seem to be loading and I've got 6 other Windows forms where it works perfectly.

I have created a user control form, and inserted a datagridview and selected the data I wish to view inside the table also

Is it possible? I've googled it but there's not much information on it

What I have tried:

Tried in a windows form - not much information on it using C# websites

推荐答案

应该可以,请参见此示例:多个单元格编辑自定义DataGridView [ ^ ]

和这里:基于DataGridView的用户控件及编辑对话框 [ ^ ]



您是否尝试过将表单放入用户控件?那不是应该如何使用用户控件,你应该将用户控件放在一个Form ...
Should be possible, see example here: Multiple Cell Edit Custom DataGridView[^]
and here: DataGridView based user control with edit dialog[^]

Did you try maybe to put a Form in a User control ? that is not how user controls should be used, you should put your user control in a Form ...


这篇关于用户控件表单中的Datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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