protected override void SetDataGridInColumn(DataGrid value) { base.SetDataGridInColumn(value); if (value == null) { return; } textbox.SetDataGrid(grid); grid.SuspendLayout(); grid.Controls.Add(textbox); grid.ResumeLayout(false); }
/// <summary> /// <para> /// Adds a System.Windows.Forms.TextBox control to the System.Windows.Forms.DataGrid control's System.Windows.Forms.Control.ControlCollection /// . /// </para> /// </summary> protected override void SetDataGridInColumn(DataGrid value) { base.SetDataGridInColumn(value); if (edit.ParentInternal != null) { edit.ParentInternal.Controls.Remove(edit); } if (value != null) { value.Controls.Add(edit); } // we have to tell the edit control about its dataGrid edit.SetDataGrid(value); }