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)
9415
hti.
_row
= GetRowIndexFromY(y, out int yRowTopEdge);
9482
hti.
_row
= GetRowIndexFromY(y, out int yRowTopEdge);
12115
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)
5768
hti.
_row
,
5857
hti.
_row
,
8601
&& hti.
_row
>= 0
8602
&& (Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Frozen) == 0)
8699
int firstRowIndex = hti.
_row
>= 0 ? hti.
_row
: Rows.GetFirstRow(DataGridViewElementStates.Visible);
9416
if (hti.
_row
< 0)
9421
Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti.
_row
));
9427
int rowHeight = Rows.SharedRow(hti.
_row
).GetHeight(hti.
_row
);
9432
if (RowIsResizable(hti.
_row
) && AutoSizeRowsMode == DataGridViewAutoSizeRowsMode.None)
9442
if (hti.
_row
!= DisplayedBandsInfo.FirstDisplayedScrollingRow || DisplayedBandsInfo.NumDisplayedFrozenRows > 0)
9444
indexTmp = Rows.GetPreviousRow(hti.
_row
, DataGridViewElementStates.Visible);
9483
if (hti._col < 0 || hti.
_row
< 0)
9489
Debug.Assert(yRowTopEdge == GetRowYFromIndex(hti.
_row
));
9569
int rowHeight = Rows.SharedRow(hti.
_row
).GetHeight(hti.
_row
);
9572
if (RowIsResizable(hti.
_row
) && AutoSizeRowsMode == DataGridViewAutoSizeRowsMode.None)
9581
if (hti.
_row
!= DisplayedBandsInfo.FirstDisplayedScrollingRow || DisplayedBandsInfo.NumDisplayedFrozenRows > 0)
9583
indexTmp = Rows.GetPreviousRow(hti.
_row
,
9610
if (hti.
_row
== rowIndex
9659
if (hti._col >= 0 && hti.
_row
>= 0)
9671
else if (_dataGridViewOper[OperationTrackCellSelect] && hti._col >= 0 && hti.
_row
>= 0)
11910
Debug.Assert(_ptMouseDownCell.Y == hti.
_row
);
11971
int rowIndex = (hti._typeInternal == DataGridViewHitTestTypeInternal.RowResizeBottom) ? hti.
_row
: hti._adjacentRow;
12068
if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti.
_row
))
12073
forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti.
_row
,
12074
forCurrentRowChange: _ptCurrentCell.Y != hti.
_row
))
12106
if (hti.
_row
>= Rows.Count)
12132
&& IsSharedCellSelected(Rows.SharedRow(hti.
_row
).Cells[hti._col], hti.
_row
)
12143
RemoveIndividuallySelectedCells(hti._col, hti.
_row
);
12168
hti.
_row
);
12172
SetSelectedCellCore(hti._col, hti.
_row
, selected: true);
12177
SetSelectedCellCore(hti._col, hti.
_row
, selected: true);
12182
SetSelectedCellCore(hti._col, hti.
_row
, selected: false);
12187
hti.
_row
,
12276
hti.
_row
,
12287
&& (Columns[hti._col].Selected || IsSharedCellSelected(Rows.SharedRow(hti.
_row
).Cells[hti._col], hti.
_row
))
12307
SetSelectedCellCore(hti._col, hti.
_row
, true);
12327
RemoveIndividuallySelectedCells(hti._col, hti.
_row
);
12358
hti.
_row
);
12362
SetSelectedCellCore(hti._col, hti.
_row
, true);
12377
SetSelectedCellCore(hti._col, hti.
_row
, false);
12382
SetSelectedCellCore(hti._col, hti.
_row
, false);
12388
hti.
_row
,
12398
if (isControlDown && ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0))
12406
_trackRow = hti.
_row
;
12430
if (_selectedBandIndexes[bandIndex] != hti.
_row
)
12457
if (hti.
_row
>= _ptAnchorCell.Y)
12459
SelectRowRange(_ptAnchorCell.Y, hti.
_row
, true);
12463
SelectRowRange(hti.
_row
, _ptAnchorCell.Y, true);
12466
else if ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) == 0)
12468
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
) ==
12469
((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0));
12470
SetSelectedRowCore(hti.
_row
, true);
12475
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
));
12476
SetSelectedRowCore(hti.
_row
, false);
12481
hti.
_row
,
12492
&& (((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0)
12493
|| IsSharedCellSelected(Rows.SharedRow(hti.
_row
).Cells[hti._col], hti.
_row
))
12513
SetSelectedCellCore(hti._col, hti.
_row
, true);
12533
RemoveIndividuallySelectedCells(hti._col, hti.
_row
);
12564
hti.
_row
);
12568
SetSelectedCellCore(hti._col, hti.
_row
, selected: true);
12583
SetSelectedCellCore(hti._col, hti.
_row
, selected: false);
12588
SetSelectedCellCore(hti._col, hti.
_row
, false);
12594
hti.
_row
,
12767
if ((hti._col != _ptCurrentCell.X || hti.
_row
!= _ptCurrentCell.Y)
12768
&& !CommitEditForOperation(hti._col, hti.
_row
, forCurrentCellChange: true))
12777
if (_ptAnchorCell.X == -1 || IsInnerCellOutOfBounds(hti._col, hti.
_row
))
12788
hti.
_row
);
12790
if (hti._col != _ptCurrentCell.X || hti.
_row
!= _ptCurrentCell.Y)
12794
hti.
_row
,
14952
OnCellDoubleClick(new DataGridViewCellEventArgs(hti._col, hti.
_row
));
15874
&& _ptMouseDownCell.Y == hti.
_row
15891
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
15895
OnCellClick(new DataGridViewCellEventArgs(hti._col, hti.
_row
));
15962
if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti.
_row
)
15975
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
16050
int rowIndex = (hti._typeInternal == DataGridViewHitTestTypeInternal.RowResizeBottom) ? hti.
_row
: hti._adjacentRow;
16119
_ptMouseDownCell.Y = hti.
_row
;
16127
DataGridViewCellMouseEventArgs dgvcme = new(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
16314
else if (_dataGridViewOper[OperationTrackRowSelect] && hti.
_row
>= 0)
16318
else if (_dataGridViewOper[OperationTrackCellSelect] && hti._col >= 0 && hti.
_row
>= 0)
16365
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, meTmp);
16369
dgvcme = new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e);
16374
&& hti.
_row
>= 0
16375
&& _ptMouseDownCell.Y == hti.
_row
16439
OnCellMouseUp(new DataGridViewCellMouseEventArgs(hti._col, hti.
_row
, mouseX, e.Y - hti.RowY, e));
17943
if (isControlDown && ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0))
17951
if (dataGridViewColumn is not null && hti.
_row
!= _ptCurrentCell.Y)
17961
fireRowLeave: hti.
_row
!= _ptCurrentCell.Y,
17962
fireRowEnter: hti.
_row
!= _ptCurrentCell.Y,
18011
if (hti.
_row
>= Rows.Count)
18038
else if ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Visible) == 0)
18046
_trackRow = hti.
_row
;
18071
if (_selectedBandIndexes[bandIndex] != hti.
_row
)
18107
if (hti.
_row
>= _ptAnchorCell.Y)
18109
SelectRowRange(_ptAnchorCell.Y, hti.
_row
, true);
18113
SelectRowRange(hti.
_row
, _ptAnchorCell.Y, true);
18116
else if ((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) == 0)
18118
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
) ==
18119
((Rows.GetRowState(hti.
_row
) & DataGridViewElementStates.Selected) != 0));
18120
SetSelectedRowCore(hti.
_row
, true);
18125
if (hti.
_row
!= _ptCurrentCell.Y)
18127
if (IsInnerCellOutOfBounds(dataGridViewColumn.Index, hti.
_row
))
18133
bool success = ScrollIntoView(dataGridViewColumn.Index, hti.
_row
, false);
18135
if (IsInnerCellOutOfBounds(dataGridViewColumn.Index, hti.
_row
))
18140
success = SetCurrentCellAddressCore(dataGridViewColumn.Index, hti.
_row
, !selectRowRange, false, true);
18162
Debug.Assert(_selectedBandIndexes.Contains(hti.
_row
));
18163
SetSelectedRowCore(hti.
_row
, false);
18402
Debug.Assert(hti.
_row
>= 0);
18406
&& hti.
_row
!= _ptCurrentCell.Y
18407
&& !CommitEditForOperation(_ptCurrentCell.X, hti.
_row
, forCurrentCellChange: true))
18413
if (IsRowOutOfBounds(hti.
_row
))
18421
if (_trackRowEdge >= _trackRow && hti.
_row
> _trackRowEdge && _trackRowEdge >= 0)
18424
hti.
_row
, true);
18425
_trackRowEdge = hti.
_row
;
18427
else if (_trackRowEdge > _trackRow && hti.
_row
< _trackRowEdge && hti.
_row
>= _trackRow && _trackRowEdge >= 0)
18429
SelectRowRange(Rows.GetNextRow(hti.
_row
, DataGridViewElementStates.Visible),
18431
_trackRowEdge = hti.
_row
;
18433
else if (hti.
_row
> _trackRow && _trackRowEdge == -1)
18436
hti.
_row
, true);
18437
_trackRowEdge = hti.
_row
;
18439
else if (_trackRowEdge <= _trackRow && hti.
_row
< _trackRowEdge && _trackRowEdge >= 0)
18441
SelectRowRange(hti.
_row
,
18444
_trackRowEdge = hti.
_row
;
18446
else if (_trackRowEdge < _trackRow && hti.
_row
> _trackRowEdge && hti.
_row
<= _trackRow && _trackRowEdge >= 0)
18449
Rows.GetPreviousRow(hti.
_row
, DataGridViewElementStates.Visible),
18451
_trackRowEdge = hti.
_row
;
18453
else if (hti.
_row
< _trackRow && _trackRowEdge == -1)
18455
SelectRowRange(hti.
_row
,
18458
_trackRowEdge = hti.
_row
;
18460
else if (_trackRowEdge > _trackRow && hti.
_row
< _trackRow)
18464
SelectRowRange(hti.
_row
,
18467
_trackRowEdge = hti.
_row
;
18469
else if (hti.
_row
> _trackRow && _trackRowEdge < _trackRow && _trackRowEdge >= 0)
18475
hti.
_row
, true);
18476
_trackRowEdge = hti.
_row
;
18484
if (_ptCurrentCell.Y != -1 && hti.
_row
!= _ptCurrentCell.Y)
18486
if (IsRowOutOfBounds(hti.
_row
))
18492
hti.
_row
,
29164
if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse.
_row
)
29176
dgvce = new DataGridViewCellEventArgs(htiToUse._col, htiToUse.
_row
);
29188
DataGridViewCellMouseEventArgs dgvcme = new(htiToUse._col, htiToUse.
_row
, mouseX, e.Y - htiToUse.RowY, e);
29883
if (hti.
_row
>= 0)
29894
if (hti._col >= 0 && hti.
_row
>= 0)
29902
if (_dataGridViewOper[OperationTrackRowSelect] && hti.
_row
>= 0)
29906
else if (_dataGridViewOper[OperationTrackCellSelect] && hti._col >= 0 && hti.
_row
>= 0)
29980
dataGridViewCell = Rows.SharedRow(hti.
_row
).Cells[hti._col];
29983
Debug.Assert(hti.
_row
== -1);
29988
dataGridViewCell = Rows.SharedRow(hti.
_row
).HeaderCell;
29991
Debug.Assert(hti.
_row
== -1);
29998
? dataGridViewCell.GetInheritedContextMenuStrip(hti.
_row
)