6 writes to EditingControl
System.Windows.Forms (6)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
2661
EditingControl
= _latestEditingControl;
2667
EditingControl
= (Control)Activator.CreateInstance(editControlType)!;
5611
EditingControl
= null;
6241
EditingControl
= null;
26785
EditingControl
= _cachedEditingControl;
27098
EditingControl
= null;
186 references to EditingControl
Accessibility_Core_App (1)
DataControls.cs (1)
38
DataGridViewComboBoxEditingControl cbox = dataGridView1.
EditingControl
as DataGridViewComboBoxEditingControl;
System.Windows.Forms (179)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (7)
1832
return
EditingControl
is not null
2174
if (
EditingControl
is not null)
2177
return
EditingControl
.Bounds.Contains(ptMouse);
2224
internal AccessibleObject? EditingControlAccessibleObject =>
EditingControl
?.AccessibilityObject;
2736
if (
EditingControl
is not null
2865
=>
EditingControl
is not null || _dataGridViewState1[State1_CurrentCellInEditMode];
2909
|| (EditMode != DataGridViewEditMode.EditOnEnter &&
EditingControl
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (127)
2662
Debug.Assert(((IDataGridViewEditingControl)
EditingControl
).EditingControlDataGridView == this);
2666
Debug.Assert(
EditingControl
is null);
2668
Debug.Assert(
EditingControl
is not null);
2670
((IDataGridViewEditingControl)
EditingControl
).EditingControlDataGridView = this;
2678
Debug.Assert(
EditingControl
is not null);
2679
if (string.IsNullOrEmpty(
EditingControl
.AccessibleName))
2681
EditingControl
.AccessibleName = SR.DataGridView_AccEditingControlAccName;
2684
EditingControl
.ImeMode = ImeMode;
2686
((IDataGridViewEditingControl)
EditingControl
).EditingControlRowIndex = _ptCurrentCell.Y;
2692
Debug.Assert(
EditingControl
is not null);
2694
DataGridViewEditingControlShowingEventArgs dgvese = new(
EditingControl
, dataGridViewCellStyle);
2697
if (_editingPanel is null ||
EditingControl
is null)
2703
((IDataGridViewEditingControl)
EditingControl
).ApplyCellStyleToEditingControl(dgvese.CellStyle);
2716
if (_editingPanel is null ||
EditingControl
is null)
2722
((IDataGridViewEditingControl)
EditingControl
).PrepareEditingControlForEdit(selectAll);
3064
if (endEdit && EditMode != DataGridViewEditMode.EditOnEnter &&
EditingControl
is not null)
3086
if (
EditingControl
is not null)
3088
((IDataGridViewEditingControl)
EditingControl
).EditingControlFormattedValue = _uneditedFormattedValue;
3089
((IDataGridViewEditingControl)
EditingControl
).EditingControlValueChanged = false;
3122
if (
EditingControl
is not null)
3124
((IDataGridViewEditingControl)
EditingControl
).PrepareEditingControlForEdit(selectAll: true);
3175
if (
EditingControl
is not null)
3177
((IDataGridViewEditingControl)
EditingControl
).EditingControlValueChanged = false;
3244
if (
EditingControl
is not null)
3247
if (((IDataGridViewEditingControl)
EditingControl
).RepositionEditingControlOnValueChange)
3867
Debug.Assert(((
EditingControl
is not null && ((IDataGridViewEditingControl)
EditingControl
).EditingControlValueChanged)
3905
if (
EditingControl
is not null)
3907
formattedValue = ((IDataGridViewEditingControl)
EditingControl
).GetEditingControlFormattedValue(context);
3943
if (
EditingControl
is not null)
3945
((IDataGridViewEditingControl)
EditingControl
).EditingControlValueChanged = false;
5216
if ((!onlyIfGridHasFocus || Focused) &&
EditingControl
is not null)
5219
EditingControl
.Focus();
5610
EditingControl
?.Dispose();
5743
if (sender ==
EditingControl
&&
EditingControl
is not null)
5745
adjustedX +=
EditingControl
.Location.X;
5746
adjustedY +=
EditingControl
.Location.Y;
5952
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
5962
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
5972
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
5978
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
5984
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
5990
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
5993
Debug.Assert(
EditingControl
is not null);
5997
CursorInternal = ((IDataGridViewEditingControl)
EditingControl
).EditingPanelCursor;
6010
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
6013
Debug.Assert(
EditingControl
is not null);
6032
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
6038
Debug.Assert(sender ==
EditingControl
|| sender == _editingPanel);
6223
if (
EditingControl
is not null)
6238
ImeMode editingControlImeMode =
EditingControl
.CachedImeMode; // If in restricted mode, ImeMode will be Disable.
6239
_latestEditingControl =
EditingControl
;
9726
Debug.Assert(
EditingControl
is not null);
9735
((IDataGridViewEditingControl)
EditingControl
).EditingControlValueChanged = false;
10056
if (
EditingControl
is not null && _dataGridViewState1[State1_ForwardCharMessage])
10435
if (
EditingControl
is not null
10442
EditingControl
.Invalidate();
10443
EditingControl
.Update();
10503
if (
EditingControl
is not null
10510
EditingControl
.Invalidate();
10511
EditingControl
.Update();
10526
if (dirty &&
EditingControl
is not null && ((IDataGridViewEditingControl)
EditingControl
).RepositionEditingControlOnValueChange)
11132
if (
EditingControl
is not null)
13004
if (repositionEditingControl &&
EditingControl
is not null)
13434
if (
EditingControl
is not null)
13907
if (
EditingControl
is not null)
13965
if (
EditingControl
is not null)
14509
if (
EditingControl
is not null)
14912
if (
EditingControl
is not null)
14988
if (
EditingControl
is not null &&
EditingControl
.ContainsFocus)
15791
if (
EditingControl
is not null)
16361
&&
EditingControl
is not null)
18179
if (
EditingControl
is not null)
18229
if (
EditingControl
is not null)
18378
if (
EditingControl
is not null)
18688
if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y &&
EditingControl
is not null)
19011
if (
EditingControl
is not null)
19031
if (!BecomingActiveControl && (
EditingControl
is null || !
EditingControl
.BecomingActiveControl))
19725
if (repositionEditingControl &&
EditingControl
is not null)
19782
Debug.Assert(
EditingControl
is not null);
19920
if (
EditingControl
is not null)
20098
if (
EditingControl
is not null)
21901
if (
EditingControl
is not null)
21903
PInvokeCore.SendMessage(
EditingControl
, m.MsgInternal, m.WParamInternal, m.LParamInternal);
21917
if (
EditingControl
is not null)
21919
PInvokeCore.SendMessage(
EditingControl
, m.MsgInternal, m.WParamInternal, m.LParamInternal);
21963
if (
EditingControl
is not null && (m.MsgInternal == PInvokeCore.WM_KEYDOWN || m.MsgInternal == PInvokeCore.WM_SYSKEYDOWN))
21966
((IDataGridViewEditingControl)
EditingControl
).EditingControlWantsInputKey(ke.KeyData, dataGridViewWantsInputKey);
25286
if (
EditingControl
is IDataGridViewEditingControl dataGridViewEditingControl)
25467
if (
EditingControl
is not null)
25471
if (((IDataGridViewEditingControl)
EditingControl
).RepositionEditingControlOnValueChange)
25476
((IDataGridViewEditingControl)
EditingControl
).PrepareEditingControlForEdit(selectAll: true);
25477
((IDataGridViewEditingControl)
EditingControl
).EditingControlValueChanged = false;
26342
if (
EditingControl
is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)
26786
((IDataGridViewEditingControl)
EditingControl
).EditingControlRowIndex = rowIndex;
26917
if (
EditingControl
is not null)
26919
((IDataGridViewEditingControl)
EditingControl
).EditingControlRowIndex = rowIndex;
27087
if (
EditingControl
is not null)
27095
_cachedEditingControl =
EditingControl
;
28820
Debug.Assert(
EditingControl
is not null);
28821
EditingControl
.Click -= EditingControls_Click;
28822
EditingControl
.DoubleClick -= EditingControls_DoubleClick;
28823
EditingControl
.MouseClick -= EditingControls_MouseClick;
28824
EditingControl
.MouseDoubleClick -= EditingControls_MouseDoubleClick;
28825
EditingControl
.MouseDown -= EditingControls_MouseDown;
28826
EditingControl
.MouseEnter -= EditingControls_MouseEnter;
28827
EditingControl
.MouseLeave -= EditingControls_MouseLeave;
28828
EditingControl
.MouseMove -= EditingControls_MouseMove;
28829
EditingControl
.MouseUp -= EditingControls_MouseUp;
29019
if (
EditingControl
is not null)
29088
if (
EditingControl
is not null)
29921
Debug.Assert(
EditingControl
is not null);
29922
EditingControl
.Click += EditingControls_Click;
29923
EditingControl
.DoubleClick += EditingControls_DoubleClick;
29924
EditingControl
.MouseClick += EditingControls_MouseClick;
29925
EditingControl
.MouseDoubleClick += EditingControls_MouseDoubleClick;
29926
EditingControl
.MouseDown += EditingControls_MouseDown;
29927
EditingControl
.MouseEnter += EditingControls_MouseEnter;
29928
EditingControl
.MouseLeave += EditingControls_MouseLeave;
29929
EditingControl
.MouseMove += EditingControls_MouseMove;
29930
EditingControl
.MouseUp += EditingControls_MouseUp;
30085
if (
EditingControl
is not null)
30088
PInvokeCore.SendMessage(
EditingControl
, m.MsgInternal, m.WParamInternal, m.LParamInternal);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (23)
1049
if (dataGridView?.
EditingControl
is null)
1054
if (dataGridView.
EditingControl
.ParentInternal is not null)
1056
if (dataGridView.
EditingControl
.ContainsFocus)
1058
if (dataGridView.GetContainerControl() is ContainerControl cc && (dataGridView.
EditingControl
== cc.ActiveControl || dataGridView.
EditingControl
.Contains(cc.ActiveControl)))
1071
Debug.Assert(dataGridView.
EditingControl
.ParentInternal == dataGridView.EditingPanel);
1072
Debug.Assert(dataGridView.EditingPanel.Controls.Contains(dataGridView.
EditingControl
));
1073
dataGridView.EditingPanel.Controls.Remove(dataGridView.
EditingControl
);
1074
Debug.Assert(dataGridView.
EditingControl
.ParentInternal is null);
1093
Debug.Assert(dataGridView.
EditingControl
.ParentInternal is null);
1117
Debug.Assert(DataGridView?.
EditingControl
is not null);
1118
Type editingControlType = DataGridView.
EditingControl
.GetType();
1490
IDataGridViewEditingControl? dataGridViewEditingControl = (IDataGridViewEditingControl?)DataGridView.
EditingControl
;
2464
if (dgv is null || dgv.
EditingControl
is null)
2471
if (dgv.
EditingControl
.ParentInternal is null)
2474
dgv.
EditingControl
.CausesValidation = dgv.CausesValidation;
2476
dgv.
EditingControl
.Visible = true;
2481
dgv.EditingPanel.Controls.Add(dgv.
EditingControl
);
2485
Debug.Assert(dgv.
EditingControl
.ParentInternal == dgv.EditingPanel);
2712
DataGridView.
EditingControl
is not null)
3763
if (DataGridView?.
EditingControl
is not null)
3767
DataGridView.
EditingControl
.Location = new Point(editingControlBounds.X, editingControlBounds.Y);
3772
DataGridView.
EditingControl
.Size = new Size(editingControlBounds.Width, editingControlBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (4)
399
_owner.DataGridView.
EditingControl
is not null &&
404
return _owner.DataGridView.
EditingControl
.AccessibilityObject;
420
_owner.DataGridView.
EditingControl
is not null &&
666
_owner.DataGridView.
EditingControl
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (6)
515
EditingComboBox = DataGridView.
EditingControl
as DataGridViewComboBoxEditingControl;
712
if (dgv is null || dgv.
EditingControl
is null)
1258
DataGridView.
EditingControl
is not null);
1261
if (DataGridView.
EditingControl
is ComboBox comboBox)
1332
EditingComboBox = DataGridView.
EditingControl
as DataGridViewComboBoxEditingControl;
1924
bool 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)
97
EditingTextBox = DataGridView!.
EditingControl
as DataGridViewTextBoxEditingControl;
122
if (dataGridView?.
EditingControl
is null)
127
if (dataGridView.
EditingControl
is TextBox textBox)
143
if (DataGridView.
EditingControl
is TextBox txtEditingControl)
511
DataGridView.
EditingControl
is not null);
514
if (DataGridView.
EditingControl
is TextBox textBox)
528
EditingTextBox = DataGridView.
EditingControl
as DataGridViewTextBoxEditingControl;
677
bool cellEdited = cellCurrent && DataGridView.
EditingControl
is not null;
798
DataGridView!.
EditingControl
!.Location = new Point(editingControlBounds.X, editingControlBounds.Y);
799
DataGridView.
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)
128
Assert.Null(control.
EditingControl
);
System\Windows\Forms\AccessibleObjects\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObjectTests.cs (1)
152
Assert.Null(control.
EditingControl
);
System\Windows\Forms\DataGridViewCellTests.cs (4)
4760
Assert.NotNull(dataGridView.
EditingControl
.AccessibilityObject.Parent);
4761
Assert.Same(cell.AccessibilityObject, dataGridView.
EditingControl
.AccessibilityObject.Parent);
4769
Assert.NotNull(dataGridView.
EditingControl
.AccessibilityObject.Parent);
4770
Assert.Same(cell.AccessibilityObject, dataGridView.
EditingControl
.AccessibilityObject.Parent);