DataGridView的Columns属性集合DataGridViewColumnCollection存放的是DataGridViewColumn。
从DataGridViewColumn派生出的列其自定义属性不属于DataGridViewColumn
所以在集合中不存在,编辑的时候此属性也无法保存。
并且System.Windows.Forms.Design.DataGridViewColumnCollectionEditor编辑器在帮助上查不到。
我能想到的办法是重写DataGridViewColumnCollection
------解决方案--------------------------------------------------------
public override object Clone()
{
Column col = (Column)base.Clone();
col.DataSource = this.DataSource;
return col;
}
重写这个类就可以了,我一直在研究这个课题但是有些地方解决不了
请加我QQ一起研究下
Q:68047812