6 writes to EditingControl
System.Windows.Forms (6)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
2660EditingControl = _latestEditingControl; 2666EditingControl = (Control)Activator.CreateInstance(editControlType)!; 5605EditingControl = null; 6235EditingControl = null; 26792EditingControl = _cachedEditingControl; 27106EditingControl = null;
184 references to EditingControl
System.Windows.Forms (177)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (7)
1838return EditingControl is not null 2181if (EditingControl is not null) 2184return EditingControl.Bounds.Contains(ptMouse); 2231internal AccessibleObject? EditingControlAccessibleObject => EditingControl?.AccessibilityObject; 2743if (EditingControl is not null 2872=> EditingControl is not null || _dataGridViewState1[State1_CurrentCellInEditMode]; 2916|| (EditMode != DataGridViewEditMode.EditOnEnter && EditingControl is not null)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (127)
2661Debug.Assert(((IDataGridViewEditingControl)EditingControl).EditingControlDataGridView == this); 2665Debug.Assert(EditingControl is null); 2667Debug.Assert(EditingControl is not null); 2669((IDataGridViewEditingControl)EditingControl).EditingControlDataGridView = this; 2674Debug.Assert(EditingControl is not null); 2675if (string.IsNullOrEmpty(EditingControl.AccessibleName)) 2677EditingControl.AccessibleName = SR.DataGridView_AccEditingControlAccName; 2680EditingControl.ImeMode = ImeMode; 2682((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2688Debug.Assert(EditingControl is not null); 2690DataGridViewEditingControlShowingEventArgs dgvese = new(EditingControl, dataGridViewCellStyle); 2693if (_editingPanel is null || EditingControl is null) 2699((IDataGridViewEditingControl)EditingControl).ApplyCellStyleToEditingControl(dgvese.CellStyle); 2712if (_editingPanel is null || EditingControl is null) 2718((IDataGridViewEditingControl)EditingControl).PrepareEditingControlForEdit(selectAll); 3060if (endEdit && EditMode != DataGridViewEditMode.EditOnEnter && EditingControl is not null) 3082if (EditingControl is not null) 3084((IDataGridViewEditingControl)EditingControl).EditingControlFormattedValue = _uneditedFormattedValue; 3085((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged = false; 3118if (EditingControl is not null) 3120((IDataGridViewEditingControl)EditingControl).PrepareEditingControlForEdit(selectAll: true); 3171if (EditingControl is not null) 3173((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged = false; 3240if (EditingControl is not null) 3243if (((IDataGridViewEditingControl)EditingControl).RepositionEditingControlOnValueChange) 3861Debug.Assert(((EditingControl is not null && ((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged) 3899if (EditingControl is not null) 3901formattedValue = ((IDataGridViewEditingControl)EditingControl).GetEditingControlFormattedValue(context); 3937if (EditingControl is not null) 3939((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged = false; 5210if ((!onlyIfGridHasFocus || Focused) && EditingControl is not null) 5213EditingControl.Focus(); 5604EditingControl?.Dispose(); 5737if (sender == EditingControl && EditingControl is not null) 5739adjustedX += EditingControl.Location.X; 5740adjustedY += EditingControl.Location.Y; 5946Debug.Assert(sender == EditingControl || sender == _editingPanel); 5956Debug.Assert(sender == EditingControl || sender == _editingPanel); 5966Debug.Assert(sender == EditingControl || sender == _editingPanel); 5972Debug.Assert(sender == EditingControl || sender == _editingPanel); 5978Debug.Assert(sender == EditingControl || sender == _editingPanel); 5984Debug.Assert(sender == EditingControl || sender == _editingPanel); 5987Debug.Assert(EditingControl is not null); 5991CursorInternal = ((IDataGridViewEditingControl)EditingControl).EditingPanelCursor; 6004Debug.Assert(sender == EditingControl || sender == _editingPanel); 6007Debug.Assert(EditingControl is not null); 6026Debug.Assert(sender == EditingControl || sender == _editingPanel); 6032Debug.Assert(sender == EditingControl || sender == _editingPanel); 6217if (EditingControl is not null) 6232ImeMode editingControlImeMode = EditingControl.CachedImeMode; // If in restricted mode, ImeMode will be Disable. 6233_latestEditingControl = EditingControl; 9721Debug.Assert(EditingControl is not null); 9730((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged = false; 10051if (EditingControl is not null && _dataGridViewState1[State1_ForwardCharMessage]) 10430if (EditingControl is not null 10437EditingControl.Invalidate(); 10438EditingControl.Update(); 10498if (EditingControl is not null 10505EditingControl.Invalidate(); 10506EditingControl.Update(); 10521if (dirty && EditingControl is not null && ((IDataGridViewEditingControl)EditingControl).RepositionEditingControlOnValueChange) 11129if (EditingControl is not null) 13012if (repositionEditingControl && EditingControl is not null) 13442if (EditingControl is not null) 13915if (EditingControl is not null) 13973if (EditingControl is not null) 14517if (EditingControl is not null) 14921if (EditingControl is not null) 14997if (EditingControl is not null && EditingControl.ContainsFocus) 15804if (EditingControl is not null) 16374&& EditingControl is not null) 18189if (EditingControl is not null) 18239if (EditingControl is not null) 18388if (EditingControl is not null) 18698if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 19021if (EditingControl is not null) 19041if (!BecomingActiveControl && (EditingControl is null || !EditingControl.BecomingActiveControl)) 19736if (repositionEditingControl && EditingControl is not null) 19790Debug.Assert(EditingControl is not null); 19928if (EditingControl is not null) 20106if (EditingControl is not null) 21904if (EditingControl is not null) 21906PInvokeCore.SendMessage(EditingControl, m.MsgInternal, m.WParamInternal, m.LParamInternal); 21920if (EditingControl is not null) 21922PInvokeCore.SendMessage(EditingControl, m.MsgInternal, m.WParamInternal, m.LParamInternal); 21966if (EditingControl is not null && (m.MsgInternal == PInvokeCore.WM_KEYDOWN || m.MsgInternal == PInvokeCore.WM_SYSKEYDOWN)) 21969((IDataGridViewEditingControl)EditingControl).EditingControlWantsInputKey(ke.KeyData, dataGridViewWantsInputKey); 25294if (EditingControl is IDataGridViewEditingControl dataGridViewEditingControl) 25475if (EditingControl is not null) 25479if (((IDataGridViewEditingControl)EditingControl).RepositionEditingControlOnValueChange) 25484((IDataGridViewEditingControl)EditingControl).PrepareEditingControlForEdit(selectAll: true); 25485((IDataGridViewEditingControl)EditingControl).EditingControlValueChanged = false; 26350if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26793((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = rowIndex; 26924if (EditingControl is not null) 26926((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = rowIndex; 27095if (EditingControl is not null) 27103_cachedEditingControl = EditingControl; 28828Debug.Assert(EditingControl is not null); 28829EditingControl.Click -= EditingControls_Click; 28830EditingControl.DoubleClick -= EditingControls_DoubleClick; 28831EditingControl.MouseClick -= EditingControls_MouseClick; 28832EditingControl.MouseDoubleClick -= EditingControls_MouseDoubleClick; 28833EditingControl.MouseDown -= EditingControls_MouseDown; 28834EditingControl.MouseEnter -= EditingControls_MouseEnter; 28835EditingControl.MouseLeave -= EditingControls_MouseLeave; 28836EditingControl.MouseMove -= EditingControls_MouseMove; 28837EditingControl.MouseUp -= EditingControls_MouseUp; 29027if (EditingControl is not null) 29096if (EditingControl is not null) 29926Debug.Assert(EditingControl is not null); 29927EditingControl.Click += EditingControls_Click; 29928EditingControl.DoubleClick += EditingControls_DoubleClick; 29929EditingControl.MouseClick += EditingControls_MouseClick; 29930EditingControl.MouseDoubleClick += EditingControls_MouseDoubleClick; 29931EditingControl.MouseDown += EditingControls_MouseDown; 29932EditingControl.MouseEnter += EditingControls_MouseEnter; 29933EditingControl.MouseLeave += EditingControls_MouseLeave; 29934EditingControl.MouseMove += EditingControls_MouseMove; 29935EditingControl.MouseUp += EditingControls_MouseUp; 30090if (EditingControl is not null) 30093PInvokeCore.SendMessage(EditingControl, m.MsgInternal, m.WParamInternal, m.LParamInternal);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (21)
1049if (dataGridView?.EditingControl is null) 1054if (dataGridView.EditingControl.ParentInternal is not null) 1056if (dataGridView.EditingControl.ContainsFocus) 1058if (dataGridView.GetContainerControl() is ContainerControl cc && (dataGridView.EditingControl == cc.ActiveControl || dataGridView.EditingControl.Contains(cc.ActiveControl))) 1071Debug.Assert(dataGridView.EditingControl.ParentInternal == dataGridView.EditingPanel); 1072Debug.Assert(dataGridView.EditingPanel.Controls.Contains(dataGridView.EditingControl)); 1073dataGridView.EditingPanel.Controls.Remove(dataGridView.EditingControl); 1074Debug.Assert(dataGridView.EditingControl.ParentInternal is null); 1093Debug.Assert(dataGridView.EditingControl.ParentInternal is null); 1117Debug.Assert(DataGridView?.EditingControl is not null); 1118Type editingControlType = DataGridView.EditingControl.GetType(); 1490IDataGridViewEditingControl? dataGridViewEditingControl = (IDataGridViewEditingControl?)DataGridView.EditingControl; 2464if (dgv is null || dgv.EditingControl is null) 2471if (dgv.EditingControl.ParentInternal is null) 2474dgv.EditingControl.CausesValidation = dgv.CausesValidation; 2476dgv.EditingControl.Visible = true; 2481dgv.EditingPanel.Controls.Add(dgv.EditingControl); 2485Debug.Assert(dgv.EditingControl.ParentInternal == dgv.EditingPanel); 2712DataGridView.EditingControl is not null) 3767if (DataGridView?.EditingControl is { } editingControl)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (4)
398_owner.DataGridView.EditingControl is not null && 403return _owner.DataGridView.EditingControl.AccessibilityObject; 419_owner.DataGridView.EditingControl is not null && 665_owner.DataGridView.EditingControl is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (6)
515EditingComboBox = DataGridView.EditingControl as DataGridViewComboBoxEditingControl; 712if (dgv is null || dgv.EditingControl is null) 1251DataGridView.EditingControl is not null); 1254if (DataGridView.EditingControl is ComboBox comboBox) 1325EditingComboBox = DataGridView.EditingControl as DataGridViewComboBoxEditingControl; 1917bool cellEdited = cellCurrent && DataGridView.EditingControl is not null;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.DataGridViewComboBoxEditingControlAccessibleObject.cs (1)
37&& editingControl.EditingControlDataGridView?.EditingControl == owner
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (10)
97EditingTextBox = DataGridView!.EditingControl as DataGridViewTextBoxEditingControl; 122if (dataGridView?.EditingControl is null) 127if (dataGridView.EditingControl is TextBox textBox) 143if (DataGridView.EditingControl is TextBox txtEditingControl) 508DataGridView.EditingControl is not null); 511if (DataGridView.EditingControl is TextBox textBox) 525EditingTextBox = DataGridView.EditingControl as DataGridViewTextBoxEditingControl; 679bool cellEdited = cellCurrent && DataGridView.EditingControl is not null; 800DataGridView!.EditingControl!.Location = new Point(editingControlBounds.X, editingControlBounds.Y); 801DataGridView.EditingControl.Size = new Size(editingControlBounds.Width, editingControlBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObject.cs (1)
43&& editingControl.EditingControlDataGridView?.EditingControl == owner
System.Windows.Forms.Tests (6)
System\Windows\Forms\AccessibleObjects\DataGridViewComboBoxEditingControlAccessibleObjectTests.cs (1)
130Assert.Null(control.EditingControl);
System\Windows\Forms\AccessibleObjects\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObjectTests.cs (1)
154Assert.Null(control.EditingControl);
System\Windows\Forms\DataGridViewCellTests.cs (4)
4762Assert.NotNull(dataGridView.EditingControl.AccessibilityObject.Parent); 4763Assert.Same(cell.AccessibilityObject, dataGridView.EditingControl.AccessibilityObject.Parent); 4771Assert.NotNull(dataGridView.EditingControl.AccessibilityObject.Parent); 4772Assert.Same(cell.AccessibilityObject, dataGridView.EditingControl.AccessibilityObject.Parent);
TestPassApp (1)
DataControls.cs (1)
38DataGridViewComboBoxEditingControl cbox = dataGridView1.EditingControl as DataGridViewComboBoxEditingControl;