public virtual void Remove (DataGridViewCell cell)
{
base.List.Remove (cell);
+ ReIndex ();
OnCollectionChanged (new CollectionChangeEventArgs (
CollectionChangeAction.Remove, cell));
}
{
DataGridViewCell cell = this [index];
base.List.RemoveAt (index);
+ ReIndex ();
OnCollectionChanged (new CollectionChangeEventArgs (
CollectionChangeAction.Remove, cell));
}
+ private void ReIndex ()
+ {
+ for (int i = 0; i < base.List.Count; i++)
+ this[i].SetColumnIndex (i);
+ }
+
protected override ArrayList List {
get { return base.List; }
}