这是我的代码:
private int nMaxLength; [Description("Fondoscala valore"), Category("Sea")] public int MaxLength { get { return nMaxLength; } set { nMaxLength = value; } }
实际上是可以的,当您打开列编辑器时,您可以在sea类别下看到这个属性,并且您可以更改它,但是当您更改它时,如果转到.designer.cs文件,您可以看到maxlength值为0。没有变化…
DataGridViewTextBoxColumn 到 DataGridViewButtonColumn DataGridViewColumn Clone() 方法,即:
DataGridViewTextBoxColumn
DataGridViewButtonColumn
DataGridViewColumn
Clone()
public override object Clone() { MyDataGridViewColumn that = (MyDataGridViewColumn)base.Clone(); that.MaxLength = this.MaxLength; return that; }
如果不重写 克隆()
克隆()