伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-08/1187080118.html
}
}
--------------------------------------------------------------------------------
public class MyCustomColumn : DataGridViewColumn
{
private int _myCustomProperty;
public int MyCustomProperty
{
get { return _myCustomProperty; }
set { _myCustomProperty = value; }
}
.
.
.
}
经过一番上网搜索,终于找到了解决方法,原来需要在自定义的Column类中,覆盖Clone()方法!经过一番修改,测试,^_^果然搞定。废话少说,示意代码如下:
public override object Clone()
{
MyCustomColumn col = (MyCustomColumn)base.Clone();
col.MyCustomProperty = _myCustomProperty;
return col;
}
自定义DataGridView列的设计期支持,自定义属性的保存!
'http://www.etoow.com/html/2007-08/1187080118.html