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