4 writes to col
System.Windows.Forms (4)
winforms\Managed\System\WinForms\DataGridViewHitTestInfo.cs (1)
39
this.row = this.
col
= -1;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (3)
9444
hti.
col
= GetColumnIndexFromX(x, out xColumnLeftEdge);
9622
hti.
col
= GetColumnIndexFromX(x, out xColumnLeftEdge);
12468
hti.
col
= dataGridViewLastVisibleColumn.Index;
175 references to col
System.Windows.Forms (175)
winforms\Managed\System\WinForms\DataGridViewHitTestInfo.cs (5)
52
return this.
col
;
117
this.
col
== hti.
col
);
130
this.
col
);
139
return "{ Type:" + type.ToString() + ", Column:" +
col
.ToString(CultureInfo.CurrentCulture) + ", Row:" + row.ToString(CultureInfo.CurrentCulture) + " }";
winforms\Managed\System\WinForms\DataGridViewMethods.cs (170)
3696
Debug.Assert(hti.
col
!= -1);
3700
int xColumnLeftEdge = GetColumnXFromIndex(hti.
col
);
3701
int wColumn = this.Columns[hti.
col
].Width;
3706
previousColumnIndex = hti.
col
;
3711
DataGridViewColumn dataGridViewColumnPrev = this.Columns.GetPreviousColumn(this.Columns[hti.
col
],
3723
hti.
col
: hti.adjacentCol;
3733
!(previousColumnIndex == -1 && hti.
col
== this.trackColumn) &&
3742
Debug.Assert(hti.
col
!= -1);
3743
if (hti.
col
!= this.trackColumn)
5824
mouseX += ((hti.
col
== -1) ? this.RowHeadersWidth : this.Columns[hti.
col
].Thickness);
5826
DataGridViewCellMouseEventArgs dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, me.Y - hti.RowY, me);
5901
dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, me.Y - hti.RowY, me);
8683
if (hti.
col
>= 0)
8685
firstColumnIndex = hti.
col
;
8773
hti.
col
>= 0 &&
8774
!this.Columns[hti.
col
].Frozen)
9445
if (hti.
col
< 0)
9449
Debug.Assert(xColumnLeftEdge == GetColumnXFromIndex(hti.
col
));
9454
int columnWidth = this.Columns[hti.
col
].Thickness;
9467
DataGridViewColumn dataGridViewColumn = this.Columns[hti.
col
];
9486
dataGridViewColumn = this.Columns.GetPreviousColumn(this.Columns[hti.
col
],
9624
if (hti.
col
< 0 || hti.row < 0)
9628
Debug.Assert(xColumnLeftEdge == GetColumnXFromIndex(hti.
col
));
9636
int columnWidth = this.Columns[hti.
col
].Thickness;
9648
DataGridViewColumn dataGridViewColumn = this.Columns[hti.
col
];
9660
if (hti.
col
!= this.displayedBandsInfo.FirstDisplayedScrollingCol || this.displayedBandsInfo.LastTotallyDisplayedScrollingCol >= 0)
9662
dataGridViewColumn = this.Columns.GetPreviousColumn(this.Columns[hti.
col
],
9707
if (hti.
col
== dataGridViewColumn.Index &&
9801
if (hti.
col
>= 0)
9816
if (hti.
col
>= 0 && hti.row >= 0)
9824
if (this.dataGridViewOper[DATAGRIDVIEWOPER_trackColSelect] && hti.
col
>= 0)
9828
else if (this.dataGridViewOper[DATAGRIDVIEWOPER_trackCellSelect] && hti.
col
>= 0 && hti.row >= 0)
12285
Debug.Assert(this.ptMouseDownCell.X == hti.
col
);
12336
int columnIndex = (hti.typeInternal == DataGridViewHitTestTypeInternal.ColumnResizeRight) ? hti.
col
: hti.adjacentCol;
12367
BeginColumnRelocation(ptGridCoord.X, hti.
col
);
12441
(this.ptCurrentCell.X != hti.
col
|| this.ptCurrentCell.Y != hti.row))
12445
this.ptCurrentCell.X != hti.
col
|| this.ptCurrentCell.Y != hti.row /*forCurrentCellChange*/,
12459
if (hti.
col
>= this.Columns.Count)
12501
IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.
col
], hti.row) &&
12511
RemoveIndividuallySelectedCells(hti.
col
, hti.row);
12527
UpdateSelectedCellsBlock(this.ptAnchorCell.X, ref oldEdgeColumnIndex, hti.
col
,
12532
SetSelectedCellCore(hti.
col
, hti.row, true);
12537
SetSelectedCellCore(hti.
col
, hti.row, true);
12542
SetSelectedCellCore(hti.
col
, hti.row, false);
12544
bool success = SetCurrentCellAddressCore(hti.
col
, hti.row, !isShiftDown, false, true);
12551
if (isControlDown && this.Columns[hti.
col
].Selected)
12558
this.trackColumn = hti.
col
;
12581
if (this.selectedBandIndexes[bandIndex] != hti.
col
)
12606
if (this.Columns.DisplayInOrder(this.ptAnchorCell.X, hti.
col
))
12608
SelectColumnRange(this.ptAnchorCell.X, hti.
col
, true);
12612
SelectColumnRange(hti.
col
, this.ptAnchorCell.X, true);
12615
else if (!this.selectedBandIndexes.Contains(hti.
col
))
12617
SetSelectedColumnCore(hti.
col
, true);
12622
Debug.Assert(this.selectedBandIndexes.Contains(hti.
col
));
12623
SetSelectedColumnCore(hti.
col
, false);
12625
bool success = SetCurrentCellAddressCore(hti.
col
, hti.row, !isShiftDown, false, true);
12633
(this.Columns[hti.
col
].Selected || IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.
col
], hti.row)) &&
12651
SetSelectedCellCore(hti.
col
, hti.row, true);
12670
RemoveIndividuallySelectedCells(hti.
col
, hti.row);
12692
UpdateSelectedCellsBlock(this.ptAnchorCell.X, ref oldEdgeColumnIndex, hti.
col
,
12697
SetSelectedCellCore(hti.
col
, hti.row, true);
12712
SetSelectedCellCore(hti.
col
, hti.row, false);
12717
SetSelectedCellCore(hti.
col
, hti.row, false);
12720
bool success = SetCurrentCellAddressCore(hti.
col
, hti.row, !isShiftDown, false, true);
12804
bool success = SetCurrentCellAddressCore(hti.
col
, hti.row, !isShiftDown, false, true);
12813
IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.
col
], hti.row)) &&
12831
SetSelectedCellCore(hti.
col
, hti.row, true);
12850
RemoveIndividuallySelectedCells(hti.
col
, hti.row);
12872
UpdateSelectedCellsBlock(this.ptAnchorCell.X, ref oldEdgeColumnIndex, hti.
col
,
12877
SetSelectedCellCore(hti.
col
, hti.row, true);
12892
SetSelectedCellCore(hti.
col
, hti.row, false);
12897
SetSelectedCellCore(hti.
col
, hti.row, false);
12900
bool success = SetCurrentCellAddressCore(hti.
col
, hti.row, !isShiftDown, false, true);
13136
if ((hti.
col
!= this.ptCurrentCell.X || hti.row != this.ptCurrentCell.Y) &&
13137
!CommitEditForOperation(hti.
col
, hti.row, true))
13145
if (this.ptAnchorCell.X == -1 || IsInnerCellOutOfBounds(hti.
col
, hti.row))
13149
UpdateSelectedCellsBlock(this.ptAnchorCell.X, ref oldEdgeColumnIndex, hti.
col
,
13151
if (hti.
col
!= this.ptCurrentCell.X || hti.row != this.ptCurrentCell.Y)
13153
bool success = SetCurrentCellAddressCore(hti.
col
, hti.row, false, false, false);
14171
if (isControlDown && this.Columns[hti.
col
].Selected)
14178
if (rowIndex > -1 && hti.
col
!= this.ptCurrentCell.X)
14226
if (IsColumnOutOfBounds(hti.
col
))
14232
this.trackColumn = hti.
col
;
14255
if (this.selectedBandIndexes[bandIndex] != hti.
col
)
14288
if (this.Columns.DisplayInOrder(this.ptAnchorCell.X, hti.
col
))
14290
SelectColumnRange(this.ptAnchorCell.X, hti.
col
, true);
14294
SelectColumnRange(hti.
col
, this.ptAnchorCell.X, true);
14297
else if (!this.selectedBandIndexes.Contains(hti.
col
))
14299
SetSelectedColumnCore(hti.
col
, true);
14304
if (hti.
col
!= this.ptCurrentCell.X)
14306
if (IsInnerCellOutOfBounds(hti.
col
, rowIndex))
14310
bool success = ScrollIntoView(hti.
col
, rowIndex, false);
14312
if (IsInnerCellOutOfBounds(hti.
col
, rowIndex))
14316
success = SetCurrentCellAddressCore(hti.
col
, rowIndex, !isShiftDown, false, true);
14333
Debug.Assert(this.selectedBandIndexes.Contains(hti.
col
));
14334
SetSelectedColumnCore(hti.
col
, false);
14596
Debug.Assert(hti.
col
>= 0);
14600
hti.
col
!= this.ptCurrentCell.X &&
14601
!CommitEditForOperation(hti.
col
, this.ptCurrentCell.Y, true))
14606
if (IsColumnOutOfBounds(hti.
col
))
14614
if (this.trackColumnEdge >= 0 && (this.Columns.DisplayInOrder(this.trackColumn, this.trackColumnEdge) || this.trackColumnEdge == this.trackColumn) && this.Columns.DisplayInOrder(this.trackColumnEdge, hti.
col
))
14618
SelectColumnRange(dataGridViewColumn.Index, hti.
col
, true);
14619
this.trackColumnEdge = hti.
col
;
14621
else if (this.trackColumnEdge >= 0 && this.Columns.DisplayInOrder(this.trackColumn, this.trackColumnEdge) && this.Columns.DisplayInOrder(hti.
col
, this.trackColumnEdge) && (this.Columns.DisplayInOrder(this.trackColumn, hti.
col
) || hti.
col
== this.trackColumn))
14623
DataGridViewColumn dataGridViewColumn = this.Columns.GetNextColumn(this.Columns[hti.
col
], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14626
this.trackColumnEdge = hti.
col
;
14628
else if (this.trackColumnEdge == -1 && this.Columns.DisplayInOrder(this.trackColumn, hti.
col
))
14632
SelectColumnRange(dataGridViewColumn.Index, hti.
col
, true);
14633
this.trackColumnEdge = hti.
col
;
14635
else if (this.trackColumnEdge >= 0 && (this.Columns.DisplayInOrder(this.trackColumnEdge, this.trackColumn) || this.trackColumnEdge == this.trackColumn) && this.Columns.DisplayInOrder(hti.
col
, this.trackColumnEdge))
14639
SelectColumnRange(hti.
col
, dataGridViewColumn.Index, true);
14640
this.trackColumnEdge = hti.
col
;
14642
else if (this.trackColumnEdge >= 0 && this.Columns.DisplayInOrder(this.trackColumnEdge, this.trackColumn) && this.Columns.DisplayInOrder(this.trackColumnEdge, hti.
col
) && (this.Columns.DisplayInOrder(hti.
col
, this.trackColumn) || hti.
col
== this.trackColumn))
14644
DataGridViewColumn dataGridViewColumn = this.Columns.GetPreviousColumn(this.Columns[hti.
col
], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14647
this.trackColumnEdge = hti.
col
;
14649
else if (this.trackColumnEdge == -1 && this.Columns.DisplayInOrder(hti.
col
, this.trackColumn))
14653
SelectColumnRange(hti.
col
, dataGridViewColumn.Index, true);
14654
this.trackColumnEdge = hti.
col
;
14656
else if (this.trackColumnEdge >= 0 && this.Columns.DisplayInOrder(this.trackColumn, this.trackColumnEdge) && this.Columns.DisplayInOrder(hti.
col
, this.trackColumn))
14663
SelectColumnRange(hti.
col
, dataGridViewColumn.Index, true);
14664
this.trackColumnEdge = hti.
col
;
14666
else if (this.trackColumnEdge >= 0 && this.Columns.DisplayInOrder(this.trackColumn, hti.
col
) && this.Columns.DisplayInOrder(this.trackColumnEdge, this.trackColumn))
14673
SelectColumnRange(dataGridViewColumn.Index, hti.
col
, true);
14674
this.trackColumnEdge = hti.
col
;
14682
if (this.ptCurrentCell.X != -1 && hti.
col
!= this.ptCurrentCell.X)
14684
if (this.ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti.
col
))
14688
bool success = SetCurrentCellAddressCore(hti.
col
,
15448
OnCellDoubleClick(new DataGridViewCellEventArgs(hti.
col
, hti.row));
16326
if (this.ptMouseDownCell.X == hti.
col
&&
16342
mouseX += ((hti.
col
== -1) ? this.RowHeadersWidth : this.Columns[hti.
col
].Thickness);
16344
dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, e.Y - hti.RowY, e);
16348
OnCellClick(new DataGridViewCellEventArgs(hti.
col
, hti.row));
16412
if (this.ptMouseDownCell.X == hti.
col
&& this.ptMouseDownCell.Y == hti.row)
16422
mouseX += ((hti.
col
== -1) ? this.RowHeadersWidth : this.Columns[hti.
col
].Thickness);
16424
dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, e.Y - hti.RowY, e);
16448
int columnIndex = (hti.typeInternal == DataGridViewHitTestTypeInternal.ColumnResizeRight) ? hti.
col
: hti.adjacentCol;
16540
this.ptMouseDownCell.X = hti.
col
;
16546
mouseX += ((hti.
col
== -1) ? this.RowHeadersWidth : this.Columns[hti.
col
].Thickness);
16548
DataGridViewCellMouseEventArgs dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, e.Y - hti.RowY, e);
16753
if (this.dataGridViewOper[DATAGRIDVIEWOPER_trackColSelect] && hti.
col
>= 0)
16761
else if (this.dataGridViewOper[DATAGRIDVIEWOPER_trackCellSelect] && hti.
col
>= 0 && hti.row >= 0)
16802
mouseX += ((hti.
col
== -1) ? this.RowHeadersWidth : this.Columns[hti.
col
].Thickness);
16808
dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, e.Y - hti.RowY, meTmp);
16812
dgvcme = new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, e.Y - hti.RowY, e);
16814
if (hti.
col
>= 0 && this.ptMouseDownCell.X == hti.
col
&&
16876
mouseX += ((hti.
col
== -1) ? this.RowHeadersWidth : this.Columns[hti.
col
].Thickness);
16878
OnCellMouseUp(new DataGridViewCellMouseEventArgs(hti.
col
, hti.row, mouseX, e.Y - hti.RowY, e));
29207
if (this.ptMouseEnteredCell.X != htiToUse.
col
|| this.ptMouseEnteredCell.Y != htiToUse.row)
29218
dgvce = new DataGridViewCellEventArgs(htiToUse.
col
, htiToUse.row);
29226
mouseX += ((htiToUse.
col
== -1) ? this.RowHeadersWidth : this.Columns[htiToUse.
col
].Thickness);
29228
DataGridViewCellMouseEventArgs dgvcme = new DataGridViewCellMouseEventArgs(htiToUse.
col
, htiToUse.row, mouseX, e.Y - htiToUse.RowY, e);
29784
if (hti.
col
>= 0 && hti.row >= 0)
29796
else if (this.dataGridViewOper[DATAGRIDVIEWOPER_trackCellSelect] && hti.
col
>= 0 && hti.row >= 0)
29872
dataGridViewCell = this.Rows.SharedRow(hti.row).Cells[hti.
col
];
29876
dataGridViewCell = this.Columns[hti.
col
].HeaderCell;
29879
Debug.Assert(hti.
col
== -1);
29884
Debug.Assert(hti.
col
== -1);