1 write to _ptCurrentCell
System.Windows.Forms (1)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
471_ptCurrentCell = new Point(-1, -1);
944 references to _ptCurrentCell
System.Windows.Forms (944)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (49)
1131if (_ptCurrentCell.X != -1 && ColumnEditable(_ptCurrentCell.X)) 1136if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y)) 1707if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1712Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1713Debug.Assert(_ptCurrentCell.X < Columns.Count); 1714Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1715DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1716return dataGridViewRow.Cells[_ptCurrentCell.X]; 1720if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1721|| (value is null && _ptCurrentCell.X != -1)) 1775public Point CurrentCellAddress => _ptCurrentCell; 1781Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 1782Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1783DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1785DataGridViewCell dataGridViewCell = dataGridViewRow.Cells[_ptCurrentCell.X]; 1786Debug.Assert(IsSharedCellVisible(dataGridViewCell, _ptCurrentCell.Y)); 1795if (_ptCurrentCell.X == -1) 1800Debug.Assert(_ptCurrentCell.Y != -1); 1802bool previousVisibleColumnExists = (Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1803bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1813if (_ptCurrentCell.X == -1) 1818Debug.Assert(_ptCurrentCell.Y != -1); 1820bool nextVisibleColumnExists = (Columns.GetNextColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1821bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1831if (_ptCurrentCell.X == -1) 1836Debug.Assert(_ptCurrentCell.Y != -1); 1849if (_ptCurrentCell.X == -1) 1854Debug.Assert(_ptCurrentCell.Y >= 0); 1855Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1857return Rows[_ptCurrentCell.Y]; 2487if (_ptCurrentCell.X >= 0 2567if (_ptCurrentCell.X >= 0 2744&& !Columns[_ptCurrentCell.X].Frozen 2849=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 2900if (RowHeadersVisible && ShowEditingIcon && _ptCurrentCell.Y >= 0) 2903InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3070if (value && _ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 3142if (_ptCurrentCell.X != -1 && !SetCurrentCellAddressCore( 3894Debug.Assert(_ptCurrentCell.Y >= 0); 3895InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3902Debug.Assert(_ptCurrentCell.Y >= 0); 3903InvalidateCellPrivate(-1, _ptCurrentCell.Y);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (895)
2564public virtual bool BeginEdit(bool selectAll) => _ptCurrentCell.X == -1 2578Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 2579Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2585if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2601DataGridViewCellCancelEventArgs dgvcce = new(_ptCurrentCell.X, _ptCurrentCell.Y); 2610if (_ptCurrentCell.X > -1) 2618if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2640DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 2682((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2702if (_toolTipControl.Activated && _ptToolTipCell == _ptCurrentCell) 2719InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3038if (_ptCurrentCell.X != -1) 3040Debug.Assert(_ptCurrentCell.Y != -1); 3042int oldCurrentCellX = _ptCurrentCell.X; 3100_ptCurrentCell.X, 3101_ptCurrentCell.Y, 3126InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3130else if (_ptCurrentCell.X == -1 && Focused) 3200int oldCurrentCellX = _ptCurrentCell.X; 3205if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3233if (_ptCurrentCell.Y > -1) 3235InvalidateRowPrivate(_ptCurrentCell.Y); 3239DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3256if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3264if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3304if (_ptCurrentCell.X > -1) 3350if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3419if (_ptCurrentCell.X != -1 && SelectionMode == DataGridViewSelectionMode.FullRowSelect) 3421InvalidateCellPrivate(_ptCurrentCell.X, -1); 3757Debug.Assert(_ptCurrentCell.X > -1); 3760if (_ptCurrentCell.X == -1) 3765OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3770if (_ptCurrentCell.X == -1) 3775OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3786if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3788InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3796if (_ptCurrentCell.X == -1) 3801if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3805if (_ptCurrentCell.X == -1) 3812_ptCurrentCell.X, 3813_ptCurrentCell.Y, 3820if (_ptCurrentCell.X == -1) 3825OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3828if (_ptCurrentCell.X == -1) 3835_ptCurrentCell.X, 3836_ptCurrentCell.Y, 3846if (_ptCurrentCell.X == -1) 3851OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3856if (_ptCurrentCell.X == -1 || !IsCurrentCellInEditMode) 3872Debug.Assert(_ptCurrentCell.X > -1); 3873if (_ptCurrentCell.X == -1) 3878if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3880if (_ptCurrentCell.X == -1) 3887_ptCurrentCell.X, 3888_ptCurrentCell.Y, 3912if (_ptCurrentCell.X == -1) 3919_ptCurrentCell.X, 3920_ptCurrentCell.Y, 3954if (_ptCurrentCell.X == -1) 3959OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4019Debug.Assert(_ptCurrentCell.X > -1); 4020if (_ptCurrentCell.X == -1) 4025int columnIndex = _ptCurrentCell.X; 4026int rowIndex = _ptCurrentCell.Y; 4070fireRowLeave: _ptCurrentCell.Y != rowIndex, 4071fireRowEnter: _ptCurrentCell.Y != rowIndex, 4080if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4083int columnIndexTmp = _ptCurrentCell.X; 4084int rowIndexTmp = _ptCurrentCell.Y; 4135forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 4155if (forCurrentCellChange && _ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 5474Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5734Debug.Assert(_ptCurrentCell.X != -1); 5947Debug.Assert(_ptCurrentCell.X != -1); 5957Debug.Assert(_ptCurrentCell.X != -1); 6159if (_ptCurrentCell.X == -1) 6167int curRowIndex = _ptCurrentCell.Y; 6168int curColIndex = _ptCurrentCell.X; 6212if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6236InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6263InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8815|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 8867if (((_ptAnchorCell.X != -1 && !Columns[_ptAnchorCell.X].Frozen) || (_ptCurrentCell.X != -1 && !Columns[_ptCurrentCell.X].Frozen)) 9683_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9693Debug.Assert(_ptCurrentCell.X == dataGridViewCell.ColumnIndex); 9694dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9704_ptCurrentCell.X, 9705_ptCurrentCell.Y, 9724object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9729dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 9736_ptCurrentCell.X, 9737_ptCurrentCell.Y, 10107&& _ptCurrentCell.X != -1) 12048if (_ptCurrentCell.X == -1) 12065if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12067Point ptOriginalCurrentCell = _ptCurrentCell; 12070forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12071forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12077if (_ptCurrentCell != ptOriginalCurrentCell) 12090if (_ptCurrentCell.X == -1 && dataGridViewLastVisibleColumn is not null) 12106if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 12152int oldEdgeColumnIndex = _ptCurrentCell.X; 12153int oldEdgeRowIndex = _ptCurrentCell.Y; 12342int oldEdgeColumnIndex = _ptCurrentCell.X; 12343int oldEdgeRowIndex = _ptCurrentCell.Y; 12548int oldEdgeColumnIndex = _ptCurrentCell.X; 12549int oldEdgeRowIndex = _ptCurrentCell.Y; 12762int oldEdgeColumnIndex = _ptCurrentCell.X; 12763int oldEdgeRowIndex = _ptCurrentCell.Y; 12764if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12787if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12821&& _ptCurrentCell.X == dataGridViewCell.ColumnIndex 12822&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 12829&& ColumnEditable(_ptCurrentCell.X) 13697if (rowIndex > -1 && hti._col != _ptCurrentCell.X) 13700int oldCurrentCellX = _ptCurrentCell.X; 13701int oldCurrentCellY = _ptCurrentCell.Y; 13707fireRowLeave: rowIndex != _ptCurrentCell.Y, 13708fireRowEnter: rowIndex != _ptCurrentCell.Y, 13839if (hti._col != _ptCurrentCell.X) 13861else if (_ptCurrentCell.X != -1) 13865_ptCurrentCell.X, 13866_ptCurrentCell.Y, 14126if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14208if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X) 14210if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14217_ptCurrentCell.Y, 14436&& dataGridViewColumn.Index == _ptCurrentCell.X 14442&& ColumnEditable(_ptCurrentCell.X) 14443&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14519PositionEditingControl(_ptCurrentCell.X != e.Column.Index, true, false); 14547|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14578InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14581if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 14722else if (dataGridViewColumn.Visible && _ptCurrentCell.X == dataGridViewColumn.Index) 14743if (_ptCurrentCell.X == dataGridViewColumn.Index 14783if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 14791Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14805if (_ptCurrentCell.Y == rowIndex 14843if (_ptCurrentCell.X == dataGridViewCell.ColumnIndex 14844&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 14960if (Focused && EditMode == DataGridViewEditMode.EditOnEnter && _ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15013if (_ptCurrentCell.X > -1) 15021_ptCurrentCell.X, 15022_ptCurrentCell.Y, 15025if (_ptCurrentCell.X == -1) 15030OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15035InvalidateCellPrivate(_ptCurrentCell.X, -1); 15044if (_ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15050if (_ptCurrentCell.X > -1 && CurrentCellInternal.EditType is null && !_dataGridViewOper[OperationInMouseDown]) 15055InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15064InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15187if (_ptCurrentCell.X != -1) 15189InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15196&& _ptCurrentCell.X > -1) 15201AccessibilityNotifyCurrentCellChanged(_ptCurrentCell); 15229if (_ptCurrentCell.X == -1) 15235ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15271Debug.Assert(_ptCurrentCell.X == -1); 15309Debug.Assert(_ptCurrentCell.X == -1); 15349Debug.Assert(_ptCurrentCell.X == -1); 15408if (_ptCurrentCell.X != -1) 15410newCurrentCell = new Point(columnIndexInserted <= _ptCurrentCell.X ? _ptCurrentCell.X + 1 : _ptCurrentCell.X, 15411_ptCurrentCell.Y); 15528if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15530newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15611if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15613newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15676if (_ptCurrentCell.X != -1) 15680if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 15683_ = Rows[_ptCurrentCell.Y]; 15684CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 15688dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 15735if (_ptCurrentCell.X != -1) 15739if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 15742_ = Rows[_ptCurrentCell.Y]; 15743CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 15747dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 15769if (_ptCurrentCell.X != -1) 15773if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 15776_ = Rows[_ptCurrentCell.Y]; 15777CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 15781dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 15812if (_ptCurrentCell.X > -1 && !_dataGridViewState1[State1_LeavingWithTabKey]) 15815OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15816if (_ptCurrentCell.X == -1) 15821OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15829if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15831InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15845if (_ptCurrentCell.X != -1) 15847InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15875|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 16504if (_ptCurrentCell.X >= 0 && !CommitEdit( 16547if (_ptCurrentCell.X >= 0 && !CommitEdit( 16856&& _ptCurrentCell.X != -1 16857&& ColumnEditable(_ptCurrentCell.X) 16861&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16896Debug.Assert(_ptCurrentCell.X == -1); 16947Debug.Assert(_ptCurrentCell.X == -1); 17029if (_ptCurrentCell.X != -1) 17031int newX = _ptCurrentCell.X; 17032if (columnIndex == _ptCurrentCell.X) 17059else if (columnIndex < _ptCurrentCell.X) 17061newX = _ptCurrentCell.X - 1; 17064newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17065if (columnIndex == _ptCurrentCell.X) 17251if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17254if (rowIndexDeleted == _ptCurrentCell.Y) 17275Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17276newY = _ptCurrentCell.Y - 1; 17279newCurrentCell = new Point(_ptCurrentCell.X, newY); 17280if (rowIndexDeleted == _ptCurrentCell.Y) 17402if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17406_ptCurrentCellCache.X = _ptCurrentCell.X; 17407_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17547&& _ptCurrentCell.X == -1 17948if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 17950int oldCurrentCellX = _ptCurrentCell.X; 17951int oldCurrentCellY = _ptCurrentCell.Y; 17958fireRowLeave: hti._row != _ptCurrentCell.Y, 17959fireRowEnter: hti._row != _ptCurrentCell.Y, 18011if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 18122if (hti._row != _ptCurrentCell.Y) 18140else if (_ptCurrentCell.Y != -1) 18144_ptCurrentCell.X, 18145_ptCurrentCell.Y, 18402if (_ptCurrentCell.Y != -1 18403&& hti._row != _ptCurrentCell.Y 18404&& !CommitEditForOperation(_ptCurrentCell.X, hti._row, forCurrentCellChange: true)) 18481if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18488bool success = SetCurrentCellAddressCore(_ptCurrentCell.X, 18678if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18684&& !Columns[_ptCurrentCell.X].ReadOnly 18685&& ColumnEditable(_ptCurrentCell.X) 18698if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18979if (_ptCurrentCell.X != -1) 18983_ptCurrentCell.X, 18984_ptCurrentCell.Y, 19062if (_ptCurrentCell.X >= 0) 19065if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19072if (_ptCurrentCell.X == -1) 19077OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19080if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19083int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19087_ptCurrentCell.X, 19800Debug.Assert(dataGridViewCell.ColumnIndex == _ptCurrentCell.X); 19801Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 19814int leftEdge = GetColumnXFromIndex(_ptCurrentCell.X); 19817leftEdge -= Columns[_ptCurrentCell.X].Width - 1; 19820Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19821Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19824if (!Columns[_ptCurrentCell.X].Frozen) 19835if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19860bool isFirstDisplayedColumn = FirstDisplayedColumnIndex == _ptCurrentCell.X; 19861bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20072if (_ptCurrentCell.X > -1 20157if (_ptCurrentCell.Y != -1) 20159nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20175if (_ptCurrentCell.X == -1) 20201if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20207int oldEdgeColumnIndex = _ptCurrentCell.X; 20208int oldEdgeRowIndex = _ptCurrentCell.Y; 20209if (_ptCurrentCell.X == -1 || _ptAnchorCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20222success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20230if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20235if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20242SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20243success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20253if (_ptCurrentCell.X == -1) 20273if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20278if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20285SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20286success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20298if (_ptCurrentCell.X == -1) 20324if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20329if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20337int oldEdgeColumnIndex = _ptCurrentCell.X; 20338int oldEdgeRowIndex = _ptCurrentCell.Y; 20356SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20359success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20368if (_ptCurrentCell.X == -1) 20394if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, forCurrentCellChange: true)) 20399if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20406SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20408_ptCurrentCell.X, 20428if (_ptCurrentCell.X == -1) 20450if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20455if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20464success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20472if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20477if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20483SetSelectedRowCore(_ptCurrentCell.Y, false); 20485success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20495if (_ptCurrentCell.X == -1) 20515if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20520if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20528success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20540if (_ptCurrentCell.X == -1) 20566if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20571if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20600success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20609if (_ptCurrentCell.X == -1) 20635if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20640if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20648success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20664if (_ptCurrentCell.X == -1) 20686if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20692if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20698if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20705int oldEdgeColumnIndex = _ptCurrentCell.X; 20706int oldEdgeRowIndex = _ptCurrentCell.Y; 20716success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20724if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20729if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20735if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20737SetSelectedRowCore(_ptCurrentCell.Y, false); 20742SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20743SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20746success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20756if (_ptCurrentCell.X == -1) 20776if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20781if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20787if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20795SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20798success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20810if (_ptCurrentCell.X == -1) 20836if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20841if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20847if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20876int oldEdgeColumnIndex = _ptCurrentCell.X; 20877int oldEdgeRowIndex = _ptCurrentCell.Y; 20895SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20899success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20908if (_ptCurrentCell.X == -1) 20934if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20939if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20945if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20953SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20956success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20970if (_ptCurrentCell.X == -1) 20990if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20995if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21001success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21010if (_ptCurrentCell.X == -1) 21036if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21041if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21047success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21105int oldEdgeColumnIndex = _ptCurrentCell.X; 21106int oldEdgeRowIndex = _ptCurrentCell.Y; 21154if (_ptCurrentCell.Y > -1 21155&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21158SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21162int oldEdgeColumnIndex = _ptCurrentCell.X; 21163int oldEdgeRowIndex = _ptCurrentCell.Y; 21175if (_ptCurrentCell.Y > -1 21176&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21192if (_ptCurrentCell.Y > -1 21193&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21230if (MultiSelect && _ptCurrentCell.X >= 0) 21269if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21286if (MultiSelect && _ptCurrentCell.X >= 0) 21288int oldEdgeColumnIndex = _ptCurrentCell.X; 21289int oldEdgeRowIndex = _ptCurrentCell.Y; 21324if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21361if (MultiSelect && _ptCurrentCell.Y >= 0) 21416if (_ptCurrentCell.X != -1) 21455int columnIndex = _ptCurrentCell.X; 21456int rowIndex = _ptCurrentCell.Y; 21498if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ModifierKeys == 0) 21500Debug.Assert(_ptCurrentCell.Y != -1); 21503|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21504|| !ColumnEditable(_ptCurrentCell.X)); 21506if (ColumnEditable(_ptCurrentCell.X) 21507&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21510bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21527if (_ptCurrentCell.X != -1) 21529DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 21579int oldEdgeColumnIndex = _ptCurrentCell.X; 21580int oldEdgeRowIndex = _ptCurrentCell.Y; 21628if (_ptCurrentCell.Y > -1 21629&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21636int oldEdgeColumnIndex = _ptCurrentCell.X; 21637int oldEdgeRowIndex = _ptCurrentCell.Y; 21649if (_ptCurrentCell.Y > -1 21650&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21666if (_ptCurrentCell.Y > -1 21667&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21704if (MultiSelect && _ptCurrentCell.X >= 0) 21748if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21765if (MultiSelect && _ptCurrentCell.X >= 0) 21767int oldEdgeColumnIndex = _ptCurrentCell.X; 21768int oldEdgeRowIndex = _ptCurrentCell.Y; 21803if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21875if (_ptCurrentCell.X != -1) 21881&& ColumnEditable(_ptCurrentCell.X) 21882&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21899bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22002if ((keyData & Keys.Alt) == Keys.Alt && AllowUserToResizeColumns && _ptCurrentCell.X != -1) 22006DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22011BeginKeyboardColumnResize(_ptCurrentCell.X); 22038if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22080if (_ptCurrentCell.X != -1) 22082dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 22106if (_ptCurrentCell.X == -1) 22127if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22132if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22140int oldEdgeColumnIndex = _ptCurrentCell.X; 22141int oldEdgeRowIndex = _ptCurrentCell.Y; 22158SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22161success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22167if (_ptCurrentCell.X == -1) 22188if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22193if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22199SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22200success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22217if (_ptCurrentCell.X == -1) 22238if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22243if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22270success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22276if (_ptCurrentCell.X == -1) 22297if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22302if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22309success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22326if (_ptCurrentCell.X == -1) 22347if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22352if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22357if (Columns[_ptCurrentCell.X].Selected) 22383int oldEdgeColumnIndex = _ptCurrentCell.X; 22384int oldEdgeRowIndex = _ptCurrentCell.Y; 22401SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22405success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22411if (_ptCurrentCell.X == -1) 22432if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22437if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22442if (Columns[_ptCurrentCell.X].Selected) 22450SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22453success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22468if (_ptCurrentCell.X == -1) 22489if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22494if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22499success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22530if (_ptCurrentCell.X == -1) 22548if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22554int oldEdgeColumnIndex = _ptCurrentCell.X; 22555int oldEdgeRowIndex = _ptCurrentCell.Y; 22556if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22570_ptCurrentCell.Y, 22578if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22583if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22589SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22592_ptCurrentCell.Y, 22602if (_ptCurrentCell.X == -1) 22623if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22628if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22634SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22637_ptCurrentCell.Y, 22650if (_ptCurrentCell.X == -1) 22673if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22678if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22686success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22691if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22696if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22701SetSelectedColumnCore(_ptCurrentCell.X, false); 22703success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22710if (_ptCurrentCell.X == -1) 22726if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22731if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22738success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22748if (_ptCurrentCell.X == -1) 22766if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22771if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22777if (Columns[_ptCurrentCell.X].Selected) 22784int oldEdgeColumnIndex = _ptCurrentCell.X; 22785int oldEdgeRowIndex = _ptCurrentCell.Y; 22795success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22800if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22805if (_ptCurrentCell.X == -1 || IsInnerCellOutOfBounds(firstVisibleColumnIndex, firstVisibleRowIndex)) 22810if (Columns[_ptCurrentCell.X].Selected) 22812SetSelectedColumnCore(_ptCurrentCell.X, false); 22817SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22818SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22821success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22828if (_ptCurrentCell.X == -1) 22844if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22849if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22854if (Columns[_ptCurrentCell.X].Selected) 22862SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22865success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22873if (_ptCurrentCell.X == -1) 22889if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22894if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22899success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22928if (_ptCurrentCell.Y == -1) 22938nextScreenVisibleRowIndex = _ptCurrentCell.Y; 22947if (!ScrollIntoView(_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 22954_ptCurrentCell.Y, 22985if (_ptCurrentCell.X == -1) 23018if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23023if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23031int oldEdgeColumnIndex = _ptCurrentCell.X; 23032int oldEdgeRowIndex = _ptCurrentCell.Y; 23049SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23052success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23057if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23062if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23090success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23094if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23099if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23112if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23126int oldEdgeColumnIndex = _ptCurrentCell.X; 23127int oldEdgeRowIndex = _ptCurrentCell.Y; 23139if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23147SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23151success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, !MultiSelect, false, false); 23155if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23160if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23165success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true, false, false); 23189if (_ptCurrentCell.Y == -1) 23199previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23229_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 23245if (_ptCurrentCell.X == -1) 23277if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23282if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23290int oldEdgeColumnIndex = _ptCurrentCell.X; 23291int oldEdgeRowIndex = _ptCurrentCell.Y; 23308SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23311SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23315if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23320if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23348SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23352if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23357if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23370if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23384int oldEdgeColumnIndex = _ptCurrentCell.X; 23385int oldEdgeRowIndex = _ptCurrentCell.Y; 23397if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23405SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23409SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, !MultiSelect, false, false); 23413if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23418if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23423SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true, false, false); 23459if (_ptCurrentCell.X != -1) 23461dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 23485if (_ptCurrentCell.X == -1) 23506if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23511if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23518int oldEdgeColumnIndex = _ptCurrentCell.X; 23519int oldEdgeRowIndex = _ptCurrentCell.Y; 23536SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23539success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23545if (_ptCurrentCell.X == -1) 23566if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23571if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23577SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23578success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23595if (_ptCurrentCell.X == -1) 23616if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23621if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23648success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23654if (_ptCurrentCell.X == -1) 23675if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23680if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23687success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23704if (_ptCurrentCell.X == -1) 23725if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23730if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23735if (Columns[_ptCurrentCell.X].Selected) 23768int oldEdgeColumnIndex = _ptCurrentCell.X; 23769int oldEdgeRowIndex = _ptCurrentCell.Y; 23781SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23785success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23791if (_ptCurrentCell.X == -1) 23812if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23817if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23822if (Columns[_ptCurrentCell.X].Selected) 23830SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23833success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23848if (_ptCurrentCell.X == -1) 23869if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23874if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23879success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23910if (_ptCurrentCell.X == -1) 23926if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23931if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23944int oldEdgeColumnIndex = _ptCurrentCell.X; 23945int oldEdgeRowIndex = _ptCurrentCell.Y; 23953success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23959SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23960success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23967if (_ptCurrentCell.X == -1) 23983if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23988if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23994SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23995success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24005if (_ptCurrentCell.X == -1) 24021if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24026if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24041success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24046SetSelectedColumnCore(_ptCurrentCell.X, false); 24048success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24055if (_ptCurrentCell.X == -1) 24071if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24076if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24083success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24093if (_ptCurrentCell.X == -1) 24109if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24114if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24127if (Columns[_ptCurrentCell.X].Selected) 24134int oldEdgeColumnIndex = _ptCurrentCell.X; 24135int oldEdgeRowIndex = _ptCurrentCell.Y; 24145success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24150if (Columns[_ptCurrentCell.X].Selected) 24152SetSelectedColumnCore(_ptCurrentCell.X, false); 24157SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24158SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24161success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24168if (_ptCurrentCell.X == -1) 24184if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24189if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24194if (Columns[_ptCurrentCell.X].Selected) 24202SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24205success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24213if (_ptCurrentCell.X == -1) 24229if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24234if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24239success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24256if ((keyData & (Keys.Control | Keys.Shift | Keys.Alt)) == Keys.Shift && _ptCurrentCell.X != -1) 24275if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.X) 24287if (!Columns[_ptCurrentCell.X].Selected) 24289Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.X)); 24290SetSelectedColumnCore(_ptCurrentCell.X, true); 24302if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24314if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24316Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24317SetSelectedRowCore(_ptCurrentCell.Y, true); 24539if (_ptCurrentCell.Y != -1) 24541previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24555if (_ptCurrentCell.X == -1) 24571if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24576if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24582int oldEdgeColumnIndex = _ptCurrentCell.X; 24583int oldEdgeRowIndex = _ptCurrentCell.Y; 24591SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24595if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24600if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24606SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24607SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24613if (_ptCurrentCell.X == -1) 24627if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24632if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24638SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24639SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24647if (_ptCurrentCell.X == -1) 24666if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24671if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24684int oldEdgeColumnIndex = _ptCurrentCell.X; 24685int oldEdgeRowIndex = _ptCurrentCell.Y; 24697SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 24700SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24705if (_ptCurrentCell.X == -1) 24724if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24729if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24735SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, selected: true); 24737_ptCurrentCell.X, 24753if (_ptCurrentCell.X == -1) 24769if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24774if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24782SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24786if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24791if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24796SetSelectedRowCore(_ptCurrentCell.Y, false); 24798SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24804if (_ptCurrentCell.X == -1) 24818if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24823if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24830SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24838if (_ptCurrentCell.X == -1) 24857if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24862if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24889SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24894if (_ptCurrentCell.X == -1) 24913if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24918if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24925SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 24937if (_ptCurrentCell.X == -1) 24953if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24958if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24964if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24971int oldEdgeColumnIndex = _ptCurrentCell.X; 24972int oldEdgeRowIndex = _ptCurrentCell.Y; 24982SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24986if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24991if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24996if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24998SetSelectedRowCore(_ptCurrentCell.Y, false); 25003SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25004SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25007SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25013if (_ptCurrentCell.X == -1) 25027if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25032if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25037if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25045SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25048SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25056if (_ptCurrentCell.X == -1) 25075if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25080if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25085if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25111int oldEdgeColumnIndex = _ptCurrentCell.X; 25112int oldEdgeRowIndex = _ptCurrentCell.Y; 25129SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25133SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25138if (_ptCurrentCell.X == -1) 25157if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25162if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25167if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25175SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25178SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25188if (_ptCurrentCell.X == -1) 25207if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, forCurrentCellChange: true)) 25212if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25217SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25222if (_ptCurrentCell.X == -1) 25241if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25246if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25251SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25268if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ColumnEditable(_ptCurrentCell.X)) 25273if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25277bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25290object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25308InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25349_ptCurrentCell.Y, 25350_ptCurrentCell.X, 25363dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25366return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25388dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25391return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25470if (_ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 25472Debug.Assert(_ptCurrentCell.Y != -1); 25474DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26009if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26011forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26012forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26027if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26029forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26030forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26041if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26043forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26044forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26208if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26269if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26271forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26272forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26298if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26300forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26301forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26350if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26783if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26788_ptCurrentCell.X = columnIndex; 26789_ptCurrentCell.Y = rowIndex; 26803int oldCurrentCellX = _ptCurrentCell.X; 26804int oldCurrentCellY = _ptCurrentCell.Y; 26849Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 26850Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 26922_ptCurrentCell.X = columnIndex; 26923_ptCurrentCell.Y = rowIndex; 26944OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26953if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 26959InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26960if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 26962InvalidateCellPrivate(-1, _ptCurrentCell.Y); 26966&& _ptCurrentCell.X != -1 26984if (_ptCurrentCell.X != -1) 26986AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27013int oldCurrentCellX = _ptCurrentCell.X; 27014int oldCurrentCellY = _ptCurrentCell.Y; 27055Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 27056Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 27080if (_ptCurrentCell.X != -1) 27082_ptCurrentCell.X = -1; 27083_ptCurrentCell.Y = -1; 28220_ptCurrentCellCache.X = _ptCurrentCell.X; 28221_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28496if (_ptCurrentCell.X != -1) 28498dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 28508if (_ptCurrentCell.Y != -1) 28510nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28518if (_ptCurrentCell.X == -1) 28531targetRowIndex = _ptCurrentCell.Y; 28546if (_ptCurrentCell.X == -1) 28569if (_ptCurrentCell.X == -1) 28592if (_ptCurrentCell.X == -1) 28603if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28623if (_ptCurrentCell.X == -1) 28657if (_ptCurrentCell.X != -1) 28659dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 28669if (_ptCurrentCell.Y != -1) 28671previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28687if (_ptCurrentCell.X == -1) 28700targetRowIndex = _ptCurrentCell.Y; 28715if (_ptCurrentCell.X == -1) 28738if (_ptCurrentCell.X == -1) 28761if (_ptCurrentCell.X == -1) 28772if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28792if (_ptCurrentCell.X == -1) 29098PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false);