4 writes to _row
System.Windows.Forms (4)
System\Windows\Forms\Controls\DataGridView\DataGridView.HitTestInfo.cs (1)
29
_row
= _col = -1;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
9412
hti.
_row
= GetRowIndexFromY(y, out int yRowTopEdge);
9479
hti.
_row
= GetRowIndexFromY(y, out int yRowTopEdge);
12112
hti.
_row
= lastVisibleRowIndex;
164 references to _row
System.Windows.Forms (164)
System\Windows\Forms\Controls\DataGridView\DataGridView.HitTestInfo.cs (5)
53
return
_row
;
95
value is HitTestInfo hti && _type == hti._type &&
_row
== hti.
_row
&& _col == hti._col;
100
public override int GetHashCode() => HashCode.Combine(_type,
_row
, _col);
107
return $"{{ Type:{_type}, Column:{_col}, Row:{
_row
} }}";
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (159)
5765
hti.
_row
,
5854
hti.
_row
,
8598
&& hti.
_row
>= 0
8599
&& (Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Frozen) == 0)
8696
int firstRowIndex = hti.
_row
>= 0 ? hti.
_row
: Rows.GetFirstRow(DataGridViewElementStates.Visible);
9413
if (hti.
_row
< 0)
9418
Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti.
_row
));
9424
int rowHeight = Rows.SharedRow(hti.
_row
).GetHeight(hti.
_row
);
9429
if (RowIsResizable(hti.
_row
) && AutoSizeRowsMode == DataGridViewAutoSizeRowsMode.None)
9439
if (hti.
_row
!= DisplayedBandsInfo.FirstDisplayedScrollingRow || DisplayedBandsInfo.NumDisplayedFrozenRows > 0)
9441
indexTmp = Rows.GetPreviousRow(hti.
_row
, DataGridViewElementStates.Visible);
9480
if (hti._col < 0 || hti.
_row
< 0)
9486
Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti.
_row
));
9566
int rowHeight = Rows.SharedRow(hti.
_row
).GetHeight(hti.
_row
);
9569
if (RowIsResizable(hti.
_row
) && AutoSizeRowsMode == DataGridViewAutoSizeRowsMode.None)
9578
if (hti.
_row
!= DisplayedBandsInfo.FirstDisplayedScrollingRow || DisplayedBandsInfo.NumDisplayedFrozenRows > 0)
9580
indexTmp = Rows.GetPreviousRow(hti.
_row
,
9607
if (hti.
_row
== rowIndex
9656
if (hti._col >= 0 && hti.
_row
>= 0)
9668
else if (_dataGridViewOper[OperationTrackCellSelect] && hti._col >= 0 && hti.
_row
>= 0)
11907
Debug.Assert(_ptMouseDownCell.Y == hti.
_row
);
11968
int rowIndex = (hti._typeInternal == DataGridViewHitTestTypeInternal.RowResizeBottom) ? hti.
_row
: hti._adjacentRow;
12065
if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti.
_row
))
12070
forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti.
_row
,
12071
forCurrentRowChange: _ptCurrentCell.Y != hti.
_row
))
12103
if (hti.
_row
>= Rows.Count)
12129
&& IsSharedCellSelected(Rows.SharedRow(hti.
_row
).Cells[hti._col], hti.
_row
)
12140
RemoveIndividuallySelectedCells(hti._col, hti.
_row
);
12165
hti.
_row
);
12169
SetSelectedCellCore(hti._col, hti.
_row
, selected: true);
12174
SetSelectedCellCore(hti._col, hti.
_row
, selected: true);
12179
SetSelectedCellCore(hti._col, hti.
_row
, selected: false);
12184
hti.
_row
,
12273
hti.
_row
,
12284
&& (Columns[hti._col].Selected || IsSharedCellSelected(Rows.SharedRow(hti.
_row
).Cells[hti._col], hti.
_row
))
12304
SetSelectedCellCore(hti._col, hti.
_row
, true);
12324
RemoveIndividuallySelectedCells(hti._col, hti.
_row
);
12355
hti.
_row
);
12359
SetSelectedCellCore(hti._col, hti.
_row
, true);
12374
SetSelectedCellCore(hti._col, hti.
_row
, false);
12379
SetSelectedCellCore(hti._col, hti.
_row
, false);
12385
hti.
_row
,
12395
if (isControlDown && ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0))
12403
_trackRow = hti.
_row
;
12427
if (_selectedBandIndexes[bandIndex] != hti.
_row
)
12454
if (hti.
_row
>= _ptAnchorCell.Y)
12456
SelectRowRange(_ptAnchorCell.Y, hti.
_row
, true);
12460
SelectRowRange(hti.
_row
, _ptAnchorCell.Y, true);
12463
else if ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) == 0)
12465
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
) ==
12466
((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0));
12467
SetSelectedRowCore(hti.
_row
, true);
12472
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
));
12473
SetSelectedRowCore(hti.
_row
, false);
12478
hti.
_row
,
12489
&& (((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0)
12490
|| IsSharedCellSelected(Rows.SharedRow(hti.
_row
).Cells[hti._col], hti.
_row
))
12510
SetSelectedCellCore(hti._col, hti.
_row
, true);
12530
RemoveIndividuallySelectedCells(hti._col, hti.
_row
);
12561
hti.
_row
);
12565
SetSelectedCellCore(hti._col, hti.
_row
, selected: true);
12580
SetSelectedCellCore(hti._col, hti.
_row
, selected: false);
12585
SetSelectedCellCore(hti._col, hti.
_row
, false);
12591
hti.
_row
,
12764
if ((hti._col != _ptCurrentCell.X || hti.
_row
!= _ptCurrentCell.Y)
12765
&& !CommitEditForOperation(hti._col, hti.
_row
, forCurrentCellChange: true))
12774
if (_ptAnchorCell.X == -1 || IsInnerCellOutOfBounds(hti._col, hti.
_row
))
12785
hti.
_row
);
12787
if (hti._col != _ptCurrentCell.X || hti.
_row
!= _ptCurrentCell.Y)
12791
hti.
_row
,
14949
OnCellDoubleClick(new DataGridViewCellEventArgs(hti._col, hti.
_row
));
15871
&& _ptMouseDownCell.Y == hti.
_row
15888
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
15892
OnCellClick(new DataGridViewCellEventArgs(hti._col, hti.
_row
));
15959
if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti.
_row
)
15972
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
16047
int rowIndex = (hti._typeInternal == DataGridViewHitTestTypeInternal.RowResizeBottom) ? hti.
_row
: hti._adjacentRow;
16116
_ptMouseDownCell.Y = hti.
_row
;
16124
DataGridViewCellMouseEventArgs dgvcme = new(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
16311
else if (_dataGridViewOper[OperationTrackRowSelect] && hti.
_row
>= 0)
16315
else if (_dataGridViewOper[OperationTrackCellSelect] && hti._col >= 0 && hti.
_row
>= 0)
16362
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, meTmp);
16366
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
16371
&& hti.
_row
>= 0
16372
&& _ptMouseDownCell.Y == hti.
_row
16436
OnCellMouseUp(new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e));
17940
if (isControlDown && ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0))
17948
if (dataGridViewColumn is not null && hti.
_row
!= _ptCurrentCell.Y)
17958
fireRowLeave: hti.
_row
!= _ptCurrentCell.Y,
17959
fireRowEnter: hti.
_row
!= _ptCurrentCell.Y,
18008
if (hti.
_row
>= Rows.Count)
18035
else if ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Visible) == 0)
18043
_trackRow = hti.
_row
;
18068
if (_selectedBandIndexes[bandIndex] != hti.
_row
)
18104
if (hti.
_row
>= _ptAnchorCell.Y)
18106
SelectRowRange(_ptAnchorCell.Y, hti.
_row
, true);
18110
SelectRowRange(hti.
_row
, _ptAnchorCell.Y, true);
18113
else if ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) == 0)
18115
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
) ==
18116
((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0));
18117
SetSelectedRowCore(hti.
_row
, true);
18122
if (hti.
_row
!= _ptCurrentCell.Y)
18124
if (IsInnerCellOutOfBounds(dataGridViewColumn.Index, hti.
_row
))
18130
bool success = ScrollIntoView(dataGridViewColumn.Index, hti.
_row
, false);
18132
if (IsInnerCellOutOfBounds(dataGridViewColumn.Index, hti.
_row
))
18137
success = SetCurrentCellAddressCore(dataGridViewColumn.Index, hti.
_row
, !selectRowRange, false, true);
18159
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
));
18160
SetSelectedRowCore(hti.
_row
, false);
18399
Debug.Assert(hti.
_row
>= 0);
18403
&& hti.
_row
!= _ptCurrentCell.Y
18404
&& !CommitEditForOperation(_ptCurrentCell.X, hti.
_row
, forCurrentCellChange: true))
18410
if (IsRowOutOfBounds(hti.
_row
))
18418
if (_trackRowEdge >= _trackRow && hti.
_row
> _trackRowEdge && _trackRowEdge >= 0)
18421
hti.
_row
, true);
18422
_trackRowEdge = hti.
_row
;
18424
else if (_trackRowEdge > _trackRow && hti.
_row
< _trackRowEdge && hti.
_row
>= _trackRow && _trackRowEdge >= 0)
18426
SelectRowRange(Rows.GetNextRow(hti.
_row
, DataGridViewElementStates.Visible),
18428
_trackRowEdge = hti.
_row
;
18430
else if (hti.
_row
> _trackRow && _trackRowEdge == -1)
18433
hti.
_row
, true);
18434
_trackRowEdge = hti.
_row
;
18436
else if (_trackRowEdge <= _trackRow && hti.
_row
< _trackRowEdge && _trackRowEdge >= 0)
18438
SelectRowRange(hti.
_row
,
18441
_trackRowEdge = hti.
_row
;
18443
else if (_trackRowEdge < _trackRow && hti.
_row
> _trackRowEdge && hti.
_row
<= _trackRow && _trackRowEdge >= 0)
18446
Rows.GetPreviousRow(hti.
_row
, DataGridViewElementStates.Visible),
18448
_trackRowEdge = hti.
_row
;
18450
else if (hti.
_row
< _trackRow && _trackRowEdge == -1)
18452
SelectRowRange(hti.
_row
,
18455
_trackRowEdge = hti.
_row
;
18457
else if (_trackRowEdge > _trackRow && hti.
_row
< _trackRow)
18461
SelectRowRange(hti.
_row
,
18464
_trackRowEdge = hti.
_row
;
18466
else if (hti.
_row
> _trackRow && _trackRowEdge < _trackRow && _trackRowEdge >= 0)
18472
hti.
_row
, true);
18473
_trackRowEdge = hti.
_row
;
18481
if (_ptCurrentCell.Y != -1 && hti.
_row
!= _ptCurrentCell.Y)
18483
if (IsRowOutOfBounds(hti.
_row
))
18489
hti.
_row
,
29161
if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse.
_row
)
29173
dgvce = new DataGridViewCellEventArgs(htiToUse._col, htiToUse.
_row
);
29185
DataGridViewCellMouseEventArgs dgvcme = new(htiToUse._col, htiToUse.
_row
, mouseX, e.Y - htiToUse.RowY, e);
29880
if (hti.
_row
>= 0)
29891
if (hti._col >= 0 && hti.
_row
>= 0)
29899
if (_dataGridViewOper[OperationTrackRowSelect] && hti.
_row
>= 0)
29903
else if (_dataGridViewOper[OperationTrackCellSelect] && hti._col >= 0 && hti.
_row
>= 0)
29977
dataGridViewCell = Rows.SharedRow(hti.
_row
).Cells[hti._col];
29980
Debug.Assert(hti.
_row
== -1);
29985
dataGridViewCell = Rows.SharedRow(hti.
_row
).HeaderCell;
29988
Debug.Assert(hti.
_row
== -1);
29995
? dataGridViewCell.GetInheritedContextMenuStrip(hti.
_row
)