161 references to RowIndex
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
560
InvalidateRow(cell.
RowIndex
);
System.Windows.Forms (149)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (11)
1714
if ((value is not null && (value.
RowIndex
!= _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X))
1738
if (!Columns[value.ColumnIndex].Visible || (Rows.GetRowState(value.
RowIndex
) & DataGridViewElementStates.Visible) == 0)
1743
if (!ScrollIntoView(value.ColumnIndex, value.
RowIndex
, true))
1748
if (IsInnerCellOutOfBounds(value.ColumnIndex, value.
RowIndex
))
1753
ClearSelection(value.ColumnIndex, value.
RowIndex
, selectExceptionElement: true);
1756
value.
RowIndex
,
2297
if (firstDisplayedCell.
RowIndex
== -1 || firstDisplayedCell.ColumnIndex == -1)
2302
Debug.Assert(firstDisplayedCell.
RowIndex
>= 0
2303
&& firstDisplayedCell.
RowIndex
< Rows.Count
2314
if (!Rows[firstDisplayedCell.
RowIndex
].Frozen)
2316
FirstDisplayedScrollingRowIndex = firstDisplayedCell.
RowIndex
;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (31)
6889
if (GetCellCount_CellIncluded(dataGridViewCell, dataGridViewCell.
RowIndex
, displayedRequired, frozenRequired, resizableRequired, readOnlyRequired, visibleRequired))
7870
if (dataGridViewCell.
RowIndex
< lRowIndex)
7872
lRowIndex = dataGridViewCell.
RowIndex
;
7875
if (dataGridViewCell.
RowIndex
> uRowIndex)
7877
uRowIndex = dataGridViewCell.
RowIndex
;
9776
InvalidateCell(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
);
11759
Debug.Assert(dataGridViewCell.
RowIndex
>= -1);
12814
Debug.Assert(dataGridViewCell.
RowIndex
>= 0);
12825
&& _ptCurrentCell.Y == dataGridViewCell.
RowIndex
12826
&& dataGridViewCell.
RowIndex
> -1
14571
ActivateToolTip(activate: false, toolTipText: string.Empty, CurrentCell.ColumnIndex, CurrentCell.
RowIndex
);
14847
&& _ptCurrentCell.Y == dataGridViewCell.
RowIndex
14853
Debug.Assert(!Rows[dataGridViewCell.
RowIndex
].ReadOnly);
15207
ActivateToolTip(activate: false, toolTipText: string.Empty, CurrentCell.ColumnIndex, CurrentCell.
RowIndex
);
19804
Debug.Assert(dataGridViewCell.
RowIndex
== _ptCurrentCell.Y || dataGridViewCell.
RowIndex
== -1);
22048
ActivateToolTip(activate: false, toolTipText: string.Empty, dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
);
25363
if (dataGridViewCurrentCell.
RowIndex
== -1)
25388
if (dataGridViewCurrentCell.
RowIndex
== -1)
25645
SetReadOnlyCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
25660
if (dataGridViewCell.
RowIndex
== rowIndex)
25686
SetSelectedCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
25713
if (dataGridViewCell.ColumnIndex != columnIndexException || dataGridViewCell.
RowIndex
!= rowIndexException)
25715
SetSelectedCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
25722
Debug.Assert(dataGridViewCell.ColumnIndex != columnIndexException || dataGridViewCell.
RowIndex
!= rowIndexException);
25723
SetSelectedCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
25752
SetSelectedCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
25776
SetSelectedCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
25800
if (dataGridViewCell.
RowIndex
== rowIndex)
25802
SetSelectedCellCore(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
, false);
27414
if (dataGridViewCell.ColumnIndex != columnIndex || dataGridViewCell.
RowIndex
!= rowIndex)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
502
Debug.Assert(
RowIndex
>= 0); // Cell is not in a shared row.
1008
$"DataGridViewButtonCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellAccessibleObject.cs (3)
33
if (dataGridViewCell.
RowIndex
== -1)
46
dataGridView.OnCellClickInternal(new DataGridViewCellEventArgs(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
));
47
dataGridView.OnCellContentClickInternal(new DataGridViewCellEventArgs(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
));
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (56)
105
public Rectangle ContentBounds => GetContentBounds(
RowIndex
);
110
get => GetContextMenuStrip(
RowIndex
);
161
if (
RowIndex
>= 0 && ColumnIndex >= 0)
163
Debug.Assert(DataGridView.Rows.GetRowState(
RowIndex
) == DataGridView.Rows.SharedRow(
RowIndex
).State);
182
Debug.Assert(
RowIndex
>= -1);
183
DataGridViewCellStyle dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null,
RowIndex
, includeColors: false);
184
return GetEditedFormattedValue(GetValue(
RowIndex
),
RowIndex
, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting);
195
public Rectangle ErrorIconBounds => GetErrorIconBounds(
RowIndex
);
201
get => GetErrorText(
RowIndex
);
228
Debug.Assert(
RowIndex
>= -1);
229
DataGridViewCellStyle dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null,
RowIndex
, includeColors: false);
230
return GetFormattedValue(
RowIndex
, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting);
263
if (DataGridView is not null &&
RowIndex
>= 0 && ColumnIndex >= 0)
265
Debug.Assert(DataGridView.Rows.GetRowState(
RowIndex
) == DataGridView.Rows.SharedRow(
RowIndex
).State);
268
else if (OwningRow is not null && (OwningRow.DataGridView is null ||
RowIndex
>= 0))
311
for (int i =
RowIndex
- 1; i <=
RowIndex
+ 1; i++)
369
public DataGridViewElementStates InheritedState => GetInheritedState(
RowIndex
);
379
return GetInheritedStyleInternal(
RowIndex
);
400
if (
RowIndex
== -1)
408
ptCurrentCell.Y ==
RowIndex
&&
422
public Size PreferredSize => GetPreferredSize(
RowIndex
);
437
if (OwningRow is not null && (OwningRow.DataGridView is null ||
RowIndex
>= 0) && OwningRow.ReadOnly)
442
if (DataGridView is not null &&
RowIndex
>= 0 && ColumnIndex >= 0)
444
Debug.Assert(DataGridView.Rows.GetRowState(
RowIndex
) == DataGridView.Rows.SharedRow(
RowIndex
).State);
454
if (
RowIndex
== -1)
464
DataGridView.SetReadOnlyCellCore(ColumnIndex,
RowIndex
, value); // this may trigger a call to set_ReadOnlyInternal
507
if (OwningRow is not null && (OwningRow.DataGridView is null ||
RowIndex
>= 0) && OwningRow.Resizable == DataGridViewTriState.True)
512
if (DataGridView is not null &&
RowIndex
>= 0 && ColumnIndex >= 0)
514
Debug.Assert(DataGridView.Rows.GetRowState(
RowIndex
) == DataGridView.Rows.SharedRow(
RowIndex
).State);
539
if (OwningRow is not null && (OwningRow.DataGridView is null ||
RowIndex
>= 0) && OwningRow.Selected)
544
if (DataGridView is not null &&
RowIndex
>= 0 && ColumnIndex >= 0)
546
Debug.Assert(DataGridView.Rows.GetRowState(
RowIndex
) == DataGridView.Rows.SharedRow(
RowIndex
).State);
556
if (
RowIndex
== -1)
562
DataGridView.SetSelectedCellCoreInternal(ColumnIndex,
RowIndex
, value); // this may trigger a call to set_SelectedInternal
591
public Size Size => GetSize(
RowIndex
);
667
get => GetToolTipText(
RowIndex
) ?? string.Empty;
693
Debug.Assert(
RowIndex
>= -1);
694
return GetValue(
RowIndex
);
698
Debug.Assert(
RowIndex
>= -1);
699
SetValue(
RowIndex
, value);
749
if (DataGridView is not null &&
RowIndex
>= 0 && ColumnIndex >= 0)
751
Debug.Assert(DataGridView.Rows.GetRowState(
RowIndex
) == DataGridView.Rows.SharedRow(
RowIndex
).State);
754
else if (OwningRow is not null && (OwningRow.DataGridView is null ||
RowIndex
>= 0))
1778
Debug.Assert(
RowIndex
== -1);
2381
if (ColumnIndex < 0 ||
RowIndex
< 0)
2833
if (
RowIndex
== -1)
2841
DataGridView.OnCellCommonChange(ColumnIndex,
RowIndex
);
3969
return $"DataGridViewCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (2)
274
if (dataGridViewCell.
RowIndex
== -1)
706
&& _owner?.ColumnIndex != -1 && _owner?.
RowIndex
!= -1)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCancelEventArgs.cs (1)
11
: this(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellEventArgs.cs (1)
9
: this(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellLinkedList.cs (1)
162
(!column && removeTarget.DataGridViewCell.
RowIndex
== bandIndex))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (6)
215
if (
RowIndex
!= -1)
270
if (
RowIndex
!= -1)
298
if (
RowIndex
!= -1)
370
if (
RowIndex
!= -1)
855
Debug.Assert(
RowIndex
>= 0); // Cell is not in a shared row.
1703
$"DataGridViewCheckBoxCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject.cs (3)
89
if (dataGridViewCell.
RowIndex
== -1)
115
dataGridView.InvalidateCell(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
);
119
checkBoxCell.NotifyMSAAClient(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (12)
108
if (OwnsEditingComboBox(
RowIndex
))
183
if (OwnsEditingComboBox(
RowIndex
))
203
if (OwnsEditingComboBox(
RowIndex
))
245
if (
RowIndex
!= -1)
275
if (
RowIndex
!= -1)
327
if (OwnsEditingComboBox(
RowIndex
))
390
if (OwnsEditingComboBox(
RowIndex
))
438
if (OwnsEditingComboBox(
RowIndex
))
459
if (OwnsEditingComboBox(
RowIndex
))
1590
item = ItemFromComboBoxItems(
RowIndex
, string.IsNullOrEmpty(DisplayMember) ? ValueMember : DisplayMember, formattedValue);
1638
if (OwnsEditingComboBox(
RowIndex
))
2438
public override string ToString() => $"DataGridViewComboBoxCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
559
=> $"DataGridViewHeaderCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (4)
131
if (
RowIndex
!= -1)
160
RowIndex
!= -1 &&
161
DataGridView.NewRowIndex ==
RowIndex
&&
908
public override string ToString() => $"DataGridViewImageCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.DataGridViewImageCellAccessibleObject.cs (2)
47
dataGridViewCell.
RowIndex
!= -1 &&
51
dataGridView.OnCellContentClickInternal(new DataGridViewCellEventArgs(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
));
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (7)
68
if (
RowIndex
!= -1)
126
if (
RowIndex
!= -1)
176
if (
RowIndex
!= -1)
224
if (
RowIndex
!= -1)
252
if (
RowIndex
!= -1)
316
if (
RowIndex
!= -1)
1076
$"DataGridViewLinkCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.DataGridViewLinkCellAccessibleObject.cs (2)
31
if (dataGridViewCell.
RowIndex
== -1)
44
dataGridView.OnCellContentClickInternal(new DataGridViewCellEventArgs(dataGridViewCell.ColumnIndex, dataGridViewCell.
RowIndex
));
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
315
dataGridView.CurrentCell.
RowIndex
== _owningDataGridViewRow.Index)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
1073
$"DataGridViewRowHeaderCell {{ RowIndex={
RowIndex
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
73
if (OwnsEditingTextBox(
RowIndex
))
805
=> $"DataGridViewTextBoxCell {{ ColumnIndex={ColumnIndex}, RowIndex={
RowIndex
} }}";
System.Windows.Forms.Tests (11)
System\Windows\Forms\AccessibleObjects\DataGridViewButtonCellAccessibleObjectTests.cs (1)
68
Assert.Equal(-1, cell.
RowIndex
);
System\Windows\Forms\AccessibleObjects\DataGridViewCheckBoxCellAccessibleObjectTests.cs (1)
204
Assert.Equal(-1, cell.
RowIndex
);
System\Windows\Forms\AccessibleObjects\DataGridViewLinkCellAccessibleObjectTests.cs (1)
67
Assert.Equal(-1, cell.
RowIndex
);
System\Windows\Forms\DataGridViewCellTests.cs (3)
42
Assert.Equal(-1, cell.
RowIndex
);
3335
Assert.Equal(-1, cell.
RowIndex
);
3374
Assert.Equal(-1, cell.
RowIndex
);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (5)
40
Assert.Equal(-1, cell.
RowIndex
);
2037
Assert.Equal(-1, cell.
RowIndex
);
2076
Assert.Equal(-1, cell.
RowIndex
);
2123
Assert.Equal(-1, cell.
RowIndex
);
2162
Assert.Equal(-1, cell.
RowIndex
);