25 writes to OwningRow
System.Windows.Forms (25)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
10876
dataGridViewCellNew.
OwningRow
= dataGridViewRow;
11028
dataGridViewCellNew.
OwningRow
= dataGridViewRow;
15517
dataGridViewCellNew.
OwningRow
= dataGridViewRow;
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (3)
232
headerCell.
OwningRow
= (DataGridViewRow)this; // may be a shared row
261
priorValue.
OwningRow
= null;
288
value.
OwningRow
= (DataGridViewRow)this; // may be a shared row
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (8)
86
dataGridViewCell.
OwningRow
= _owner;
96
oldDataGridViewCell.
OwningRow
= null;
176
dataGridViewCell.
OwningRow
= _owner;
226
dataGridViewCell.
OwningRow
= _owner;
242
dataGridViewCell.
OwningRow
= null;
280
dataGridViewCell.
OwningRow
= _owner;
288
dataGridViewCell.
OwningRow
= _owner;
346
dataGridViewCell.
OwningRow
= null;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (11)
146
dataGridViewCell.
OwningRow
= newDataGridViewRow;
154
newDataGridViewRow.HeaderCell.
OwningRow
= newDataGridViewRow;
249
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
365
rowTemplate.HeaderCell.
OwningRow
= rowTemplate;
435
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
694
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
761
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
1446
rowTemplate.HeaderCell.
OwningRow
= rowTemplate;
1537
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
1728
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
1811
dataGridViewRow.HeaderCell.
OwningRow
= dataGridViewRow;
133 references to OwningRow
System.Windows.Forms (133)
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (2)
285
value.
OwningRow
?.HeaderCell = null;
287
Debug.Assert(value.
OwningRow
is null);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellAccessibleObject.cs (1)
44
if (dataGridViewCell.OwningColumn is not null && dataGridViewCell.
OwningRow
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (50)
156
return OwningColumn!.Displayed &&
OwningRow
!.Displayed;
258
return OwningColumn!.Frozen &&
OwningRow
!.Frozen;
260
else if (
OwningRow
is not null && (
OwningRow
.DataGridView is null || RowIndex >= 0))
262
return
OwningRow
.Frozen;
429
if (
OwningRow
is not null && (
OwningRow
.DataGridView is null || RowIndex >= 0) &&
OwningRow
.ReadOnly)
461
if (
OwningRow
is null)
471
OwningRow
.SetReadOnlyCellCore(this, value);
499
if (
OwningRow
is not null && (
OwningRow
.DataGridView is null || RowIndex >= 0) &&
OwningRow
.Resizable == DataGridViewTriState.True)
518
public int RowIndex =>
OwningRow
?.Index ?? -1;
531
if (
OwningRow
is not null && (
OwningRow
.DataGridView is null || RowIndex >= 0) &&
OwningRow
.Selected)
744
return OwningColumn!.Visible &&
OwningRow
!.Visible;
746
else if (
OwningRow
is not null && (
OwningRow
.DataGridView is null || RowIndex >= 0))
748
return
OwningRow
.Visible;
864
if (
OwningRow
is not null)
866
rect.Height +=
OwningRow
.DividerHeight;
981
else if (
OwningRow
is not null)
985
dgvabsEffective =
OwningRow
.AdjustRowHeaderBorderStyle(DataGridView.AdvancedRowHeadersBorderStyle,
991
cellState =
OwningRow
.GetState(rowIndex) | State;
996
Debug.Assert(
OwningRow
is null);
1720
Debug.Assert(
OwningRow
is not null);
1721
return
OwningRow
.GetHeight(rowIndex);
1745
if (
OwningRow
is not null)
1747
contextMenuStrip =
OwningRow
.GetContextMenuStrip(rowIndex);
1785
if (
OwningRow
is not null)
1787
state |= (
OwningRow
.GetState(-1) & (DataGridViewElementStates.Frozen | DataGridViewElementStates.ReadOnly | DataGridViewElementStates.Selected | DataGridViewElementStates.Visible));
1788
if (
OwningRow
.GetResizable(rowIndex) == DataGridViewTriState.True)
1802
Debug.Assert(
OwningRow
is not null);
1805
if (DataGridView.Rows.SharedRow(rowIndex) !=
OwningRow
)
1814
if (
OwningRow
.GetResizable(rowIndex) == DataGridViewTriState.True ||
1820
if (OwningColumn.Visible &&
OwningRow
.GetVisible(rowIndex))
1823
if (OwningColumn.Displayed &&
OwningRow
.GetDisplayed(rowIndex))
1829
if (OwningColumn.Frozen &&
OwningRow
.GetFrozen(rowIndex))
2362
Debug.Assert(
OwningRow
is not null);
2363
return new Size(OwningColumn.Thickness,
OwningRow
.GetHeight(rowIndex));
2726
if (rowIndex != -1 &&
OwningRow
is not null && OwningColumn is not null)
2728
int width = GetPreferredWidth(rowIndex,
OwningRow
.Height);
2731
if (OwningColumn.Width < width ||
OwningRow
.Height < height)
2745
else if ((rowIndex != -1 &&
OwningRow
is not null && DataGridView.RowHeadersVisible && DataGridView.RowHeadersWidth > 0 && OwningColumn is null) ||
3182
dividerThickness =
OwningRow
?.DividerHeight ?? 0;
3902
if (DataGridView is null ||
OwningRow
is null ||
OwningRow
.DataGridView is null)
3914
if (
OwningRow
.Index == DataGridView.CurrentCellAddress.Y)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (27)
55
if (_owner.OwningColumn is null || _owner.
OwningRow
is null)
62
: _owner.DataGridView.Rows.GetVisibleIndex(_owner.
OwningRow
) + RowStartIndex;
116
return _owner.
OwningRow
?.AccessibilityObject;
155
if (_owner.OwningColumn is not null && _owner.
OwningRow
is not null)
157
cellBounds = _owner.DataGridView.GetCellDisplayRectangle(_owner.OwningColumn.Index, _owner.
OwningRow
.Index, cutOverflow: false);
159
else if (_owner.
OwningRow
is not null)
161
cellBounds = _owner.DataGridView.GetCellDisplayRectangle(-1, _owner.
OwningRow
.Index, cutOverflow: false);
224
if (_owner is DataGridViewHeaderCell || _owner.ReadOnly || _owner.DataGridView is null || _owner.
OwningRow
is null)
241
_owner.
OwningRow
.Index,
442
if (_owner.DataGridView?.IsHandleCreated != true || _owner.OwningColumn is null || _owner.
OwningRow
is null)
466
if (_owner.
OwningRow
.Index == _owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible))
474
int previousVisibleRow = _owner.DataGridView.Rows.GetPreviousRow(_owner.
OwningRow
.Index, DataGridViewElementStates.Visible);
479
if (_owner.
OwningRow
.Index == _owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible))
485
int nextVisibleRow = _owner.DataGridView.Rows.GetNextRow(_owner.
OwningRow
.Index, DataGridViewElementStates.Visible);
499
Debug.Assert(_owner.
OwningRow
is not null);
506
AccessibleObject? previousRow = _owner.
OwningRow
.AccessibilityObject.Navigate(AccessibleNavigation.Previous);
518
return _owner.DataGridView.RowHeadersVisible ? _owner.
OwningRow
.AccessibilityObject.GetChild(0) : null;
527
return _owner.
OwningRow
.Cells[previousVisibleColumnIndex].AccessibilityObject;
536
Debug.Assert(_owner.
OwningRow
is not null);
545
AccessibleObject? nextRow = _owner.
OwningRow
.AccessibilityObject.Navigate(AccessibleNavigation.Next);
560
return _owner.
OwningRow
.Cells[nextVisibleColumnIndex].AccessibilityObject;
645
if (_owner.DataGridView?.IsHandleCreated != true || _owner.OwningColumn is null || _owner.
OwningRow
is null)
653
return _owner.
OwningRow
.AccessibilityObject;
718
if (_owner is {
OwningRow
.HasHeaderCell: true, DataGridView: { IsHandleCreated: true, RowHeadersVisible: true } })
720
return [_owner.
OwningRow
.HeaderCell.AccessibilityObject];
737
=> _owner?.
OwningRow
?.Visible is true && _owner.DataGridView is not null
738
? _owner.DataGridView.Rows.GetVisibleIndex(_owner.
OwningRow
)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (4)
77
if (dataGridViewCell.
OwningRow
is not null)
163
if (dataGridViewCell.
OwningRow
is not null)
204
if (dataGridViewCell.
OwningRow
is not null)
272
if (dataGridViewCell.
OwningRow
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject.cs (1)
100
if (!dataGridViewCell.ReadOnly && dataGridViewCell.OwningColumn is not null && dataGridViewCell.
OwningRow
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (17)
61
if (
OwningRow
is not null)
64
return DataGridView.RowHeadersVisible &&
OwningRow
.Displayed;
91
if (
OwningRow
is not null)
94
return
OwningRow
.Frozen;
129
if (
OwningRow
is not null)
132
return (
OwningRow
.Resizable == DataGridViewTriState.True) || (DataGridView is not null && DataGridView.RowHeadersWidthSizeMode == DataGridViewRowHeadersWidthSizeMode.EnableResizing);
166
if (
OwningRow
is not null)
169
return
OwningRow
.Visible &&
230
if (
OwningRow
is not null)
239
if (DataGridView is not null && DataGridView.Rows.SharedRow(rowIndex) !=
OwningRow
)
244
state |= (
OwningRow
.GetState(rowIndex) & DataGridViewElementStates.Frozen);
245
if (
OwningRow
.GetResizable(rowIndex) == DataGridViewTriState.True || (DataGridView is not null && DataGridView.RowHeadersWidthSizeMode == DataGridViewRowHeadersWidthSizeMode.EnableResizing))
250
if (
OwningRow
.GetVisible(rowIndex) && (DataGridView is null || DataGridView.RowHeadersVisible))
253
if (
OwningRow
.GetDisplayed(rowIndex))
359
else if (
OwningRow
is not null)
365
if (DataGridView.Rows.SharedRow(rowIndex) !=
OwningRow
)
370
return new Size(DataGridView.RowHeadersWidth,
OwningRow
.GetHeight(rowIndex));
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.DataGridViewImageCellAccessibleObject.cs (1)
49
dataGridViewCell.
OwningRow
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.DataGridViewLinkCellAccessibleObject.cs (1)
42
if (dataGridViewCell.OwningColumn is not null && dataGridViewCell.
OwningRow
is not null)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (7)
241
Debug.Assert(dataGridViewCell.
OwningRow
== dataGridViewRow);
357
Debug.Assert(dataGridViewCell.
OwningRow
== rowTemplate);
423
Debug.Assert(dataGridViewCell.
OwningRow
== dataGridViewRow);
753
Debug.Assert(dataGridViewCell.
OwningRow
== dataGridViewRow);
1438
Debug.Assert(dataGridViewCell.
OwningRow
== rowTemplate);
1525
Debug.Assert(dataGridViewCell.
OwningRow
== dataGridViewRow);
1799
Debug.Assert(dataGridViewCell.
OwningRow
== dataGridViewRow);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (5)
187
if (DataGridView is null ||
OwningRow
is null)
288
OwningRow
is null
290
:
OwningRow
.GetErrorText(rowIndex);
521
Debug.Assert(
OwningRow
is not null);
522
DataGridViewAdvancedBorderStyle dgvabsEffective =
OwningRow
.AdjustRowHeaderBorderStyle(
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (17)
27
if (Owner.DataGridView is null || Owner.
OwningRow
is null || ParentPrivate is null)
78
return Owner.
OwningRow
?.AccessibilityObject;
106
if (Owner.
OwningRow
is not null && Owner.
OwningRow
.Selected)
126
Owner.
OwningRow
is not null &&
130
Owner.
OwningRow
.Selected = true;
141
if (Owner.
OwningRow
is null || Owner.DataGridView is null)
155
if (Owner.
OwningRow
.Index == Owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible))
160
int nextVisibleRow = Owner.DataGridView.Rows.GetNextRow(Owner.
OwningRow
.Index, DataGridViewElementStates.Visible);
174
if (Owner.
OwningRow
.Index == Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible))
187
int previousVisibleRow = Owner.DataGridView.Rows.GetPreviousRow(Owner.
OwningRow
.Index, DataGridViewElementStates.Visible);
228
if (dataGridViewCell.
OwningRow
is not null &&
234
dataGridViewCell.
OwningRow
.Selected = true;
238
dataGridViewCell.
OwningRow
.Selected = false;
252
if (Owner.
OwningRow
is null)
259
NavigateDirection.NavigateDirection_Parent => Owner.
OwningRow
.AccessibilityObject,
262
? Owner.
OwningRow
.AccessibilityObject.GetChild(1) // go to the next sibling