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