4
我有一个WinForms表单,其上有一个DataGridView
。 DataGridView
设置为protected
。不能在继承形式下直观地更改DataGridView
当我继承该表单时,不可能在Visual Studio设计器中更改DataGridView
。如果我用Button
完成整件事情,它就会按预期工作。
有没有办法解决这个问题?
一些(限幅)代码(来自DatagridForm.Designer.cs):
partial class DatagridForm {
protected DataGridView dgData;
protected Button button;
}
和从Inherited.cs:
partial class Inherited : DatagridForm {
}
作为例子,你能给我们一些代码吗? – christopher 2013-02-26 12:37:28
添加了一些代码。我可以在“Inherited”的设计器中轻松移动按钮。即使'Locked'设置为'False',DataGridView也被锁定。 – 2013-02-26 12:42:03
这似乎是旧的:http://stackoverflow.com/questions/207504/datagridview-locked-on-a-inherited-usercontrol – 2013-02-26 12:52:30