private void Cells_CollectionChanged(object sender, CollectionChangeEventArgs e) { if ((this._treeCell == null) && ((e.Action == CollectionChangeAction.Add) || (e.Action == CollectionChangeAction.Refresh))) { TreeGridCell element = null; if (e.Element == null) { foreach (DataGridViewCell cell in base.Cells) { if (typeof(TreeGridCell).IsInstanceOfType(cell)) { element = (TreeGridCell)cell; break; } } } else { element = e.Element as TreeGridCell; } if (element != null) { this._treeCell = element; } } }
/// <summary> /// </summary> public override object Clone() { TreeGridCell cell1 = (TreeGridCell)base.Clone(); cell1.glyphWidth = this.glyphWidth; cell1.calculatedLeftPadding = this.calculatedLeftPadding; return(cell1); }