1 write to _ptCurrentCell
System.Windows.Forms (1)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
475_ptCurrentCell = new Point(-1, -1);
944 references to _ptCurrentCell
System.Windows.Forms (944)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (49)
1135if (_ptCurrentCell.X != -1 && ColumnEditable(_ptCurrentCell.X)) 1140if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y)) 1701if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1706Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1707Debug.Assert(_ptCurrentCell.X < Columns.Count); 1708Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1709DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1710return dataGridViewRow.Cells[_ptCurrentCell.X]; 1714if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1715|| (value is null && _ptCurrentCell.X != -1)) 1769public Point CurrentCellAddress => _ptCurrentCell; 1775Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 1776Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1777DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1779DataGridViewCell dataGridViewCell = dataGridViewRow.Cells[_ptCurrentCell.X]; 1780Debug.Assert(IsSharedCellVisible(dataGridViewCell, _ptCurrentCell.Y)); 1789if (_ptCurrentCell.X == -1) 1794Debug.Assert(_ptCurrentCell.Y != -1); 1796bool previousVisibleColumnExists = (Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1797bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1807if (_ptCurrentCell.X == -1) 1812Debug.Assert(_ptCurrentCell.Y != -1); 1814bool nextVisibleColumnExists = (Columns.GetNextColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1815bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1825if (_ptCurrentCell.X == -1) 1830Debug.Assert(_ptCurrentCell.Y != -1); 1843if (_ptCurrentCell.X == -1) 1848Debug.Assert(_ptCurrentCell.Y >= 0); 1849Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1851return Rows[_ptCurrentCell.Y]; 2480if (_ptCurrentCell.X >= 0 2560if (_ptCurrentCell.X >= 0 2737&& !Columns[_ptCurrentCell.X].Frozen 2842=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 2893if (RowHeadersVisible && ShowEditingIcon && _ptCurrentCell.Y >= 0) 2896InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3065if (value && _ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 3137if (_ptCurrentCell.X != -1 && !SetCurrentCellAddressCore( 3889Debug.Assert(_ptCurrentCell.Y >= 0); 3890InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3897Debug.Assert(_ptCurrentCell.Y >= 0); 3898InvalidateCellPrivate(-1, _ptCurrentCell.Y);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (895)
2668if (_ptCurrentCell.X == -1) 2691Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 2692Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2698if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2714DataGridViewCellCancelEventArgs dgvcce = new(_ptCurrentCell.X, _ptCurrentCell.Y); 2723if (_ptCurrentCell.X > -1) 2731if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2753DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 2798((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2818if (_toolTipControl.Activated && _ptToolTipCell == _ptCurrentCell) 2835InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3165if (_ptCurrentCell.X != -1) 3167Debug.Assert(_ptCurrentCell.Y != -1); 3169int oldCurrentCellX = _ptCurrentCell.X; 3227_ptCurrentCell.X, 3228_ptCurrentCell.Y, 3253InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3257else if (_ptCurrentCell.X == -1 && Focused) 3327int oldCurrentCellX = _ptCurrentCell.X; 3332if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3360if (_ptCurrentCell.Y > -1) 3362InvalidateRowPrivate(_ptCurrentCell.Y); 3366DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3383if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3391if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3431if (_ptCurrentCell.X > -1) 3479if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3548if (_ptCurrentCell.X != -1 && SelectionMode == DataGridViewSelectionMode.FullRowSelect) 3550InvalidateCellPrivate(_ptCurrentCell.X, -1); 3886Debug.Assert(_ptCurrentCell.X > -1); 3889if (_ptCurrentCell.X == -1) 3894OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3899if (_ptCurrentCell.X == -1) 3904OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3915if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3917InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3925if (_ptCurrentCell.X == -1) 3930if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3934if (_ptCurrentCell.X == -1) 3941_ptCurrentCell.X, 3942_ptCurrentCell.Y, 3949if (_ptCurrentCell.X == -1) 3954OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3957if (_ptCurrentCell.X == -1) 3964_ptCurrentCell.X, 3965_ptCurrentCell.Y, 3975if (_ptCurrentCell.X == -1) 3980OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3985if (_ptCurrentCell.X == -1 || !IsCurrentCellInEditMode) 4001Debug.Assert(_ptCurrentCell.X > -1); 4002if (_ptCurrentCell.X == -1) 4007if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 4009if (_ptCurrentCell.X == -1) 4016_ptCurrentCell.X, 4017_ptCurrentCell.Y, 4041if (_ptCurrentCell.X == -1) 4048_ptCurrentCell.X, 4049_ptCurrentCell.Y, 4083if (_ptCurrentCell.X == -1) 4088OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4148Debug.Assert(_ptCurrentCell.X > -1); 4149if (_ptCurrentCell.X == -1) 4154int columnIndex = _ptCurrentCell.X; 4155int rowIndex = _ptCurrentCell.Y; 4199fireRowLeave: _ptCurrentCell.Y != rowIndex, 4200fireRowEnter: _ptCurrentCell.Y != rowIndex, 4209if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4212int columnIndexTmp = _ptCurrentCell.X; 4213int rowIndexTmp = _ptCurrentCell.Y; 4264forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 4284if (forCurrentCellChange && _ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 5632Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5905Debug.Assert(_ptCurrentCell.X != -1); 6118Debug.Assert(_ptCurrentCell.X != -1); 6128Debug.Assert(_ptCurrentCell.X != -1); 6338if (_ptCurrentCell.X == -1) 6346int curRowIndex = _ptCurrentCell.Y; 6347int curColIndex = _ptCurrentCell.X; 6391if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6415InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6442InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 9102|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 9154if (((_ptAnchorCell.X != -1 && !Columns[_ptAnchorCell.X].Frozen) || (_ptCurrentCell.X != -1 && !Columns[_ptCurrentCell.X].Frozen)) 10085_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 10095Debug.Assert(_ptCurrentCell.X == dataGridViewCell.ColumnIndex); 10096dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 10106_ptCurrentCell.X, 10107_ptCurrentCell.Y, 10136object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 10141dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 10148_ptCurrentCell.X, 10149_ptCurrentCell.Y, 10524&& _ptCurrentCell.X != -1) 12463if (_ptCurrentCell.X == -1) 12480if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12482Point ptOriginalCurrentCell = _ptCurrentCell; 12485forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12486forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12492if (_ptCurrentCell != ptOriginalCurrentCell) 12505if (_ptCurrentCell.X == -1 && dataGridViewLastVisibleColumn is not null) 12521if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 12567int oldEdgeColumnIndex = _ptCurrentCell.X; 12568int oldEdgeRowIndex = _ptCurrentCell.Y; 12757int oldEdgeColumnIndex = _ptCurrentCell.X; 12758int oldEdgeRowIndex = _ptCurrentCell.Y; 12963int oldEdgeColumnIndex = _ptCurrentCell.X; 12964int oldEdgeRowIndex = _ptCurrentCell.Y; 13173int oldEdgeColumnIndex = _ptCurrentCell.X; 13174int oldEdgeRowIndex = _ptCurrentCell.Y; 13175if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 13198if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 13232&& _ptCurrentCell.X == dataGridViewCell.ColumnIndex 13233&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 13240&& ColumnEditable(_ptCurrentCell.X) 14108if (rowIndex > -1 && hti._col != _ptCurrentCell.X) 14111int oldCurrentCellX = _ptCurrentCell.X; 14112int oldCurrentCellY = _ptCurrentCell.Y; 14118fireRowLeave: rowIndex != _ptCurrentCell.Y, 14119fireRowEnter: rowIndex != _ptCurrentCell.Y, 14250if (hti._col != _ptCurrentCell.X) 14272else if (_ptCurrentCell.X != -1) 14276_ptCurrentCell.X, 14277_ptCurrentCell.Y, 14537if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14619if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X) 14621if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14628_ptCurrentCell.Y, 14847&& dataGridViewColumn.Index == _ptCurrentCell.X 14853&& ColumnEditable(_ptCurrentCell.X) 14854&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14930PositionEditingControl(_ptCurrentCell.X != e.Column.Index, true, false); 14958|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14989InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14992if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 15132else if (dataGridViewColumn.Visible && _ptCurrentCell.X == dataGridViewColumn.Index) 15153if (_ptCurrentCell.X == dataGridViewColumn.Index 15193if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 15201Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 15215if (_ptCurrentCell.Y == rowIndex 15253if (_ptCurrentCell.X == dataGridViewCell.ColumnIndex 15254&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 15370if (Focused && EditMode == DataGridViewEditMode.EditOnEnter && _ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15423if (_ptCurrentCell.X > -1) 15431_ptCurrentCell.X, 15432_ptCurrentCell.Y, 15435if (_ptCurrentCell.X == -1) 15440OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15445InvalidateCellPrivate(_ptCurrentCell.X, -1); 15454if (_ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15460if (_ptCurrentCell.X > -1 && CurrentCellInternal.EditType is null && !_dataGridViewOper[OperationInMouseDown]) 15465InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15474InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15597if (_ptCurrentCell.X != -1) 15599InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15606&& _ptCurrentCell.X > -1) 15611AccessibilityNotifyCurrentCellChanged(_ptCurrentCell); 15639if (_ptCurrentCell.X == -1) 15645ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15681Debug.Assert(_ptCurrentCell.X == -1); 15719Debug.Assert(_ptCurrentCell.X == -1); 15759Debug.Assert(_ptCurrentCell.X == -1); 15818if (_ptCurrentCell.X != -1) 15820newCurrentCell = new Point(columnIndexInserted <= _ptCurrentCell.X ? _ptCurrentCell.X + 1 : _ptCurrentCell.X, 15821_ptCurrentCell.Y); 15937if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15939newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 16020if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 16022newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 16085if (_ptCurrentCell.X != -1) 16089if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 16091DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; 16092CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 16096dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 16143if (_ptCurrentCell.X != -1) 16147if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 16149DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; 16150CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 16154dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 16176if (_ptCurrentCell.X != -1) 16180if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 16182DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; 16183CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 16187dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 16218if (_ptCurrentCell.X > -1 && !_dataGridViewState1[State1_LeavingWithTabKey]) 16221OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 16222if (_ptCurrentCell.X == -1) 16227OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 16235if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 16237InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 16251if (_ptCurrentCell.X != -1) 16253InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 16281|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 16913if (_ptCurrentCell.X >= 0 && !CommitEdit( 16956if (_ptCurrentCell.X >= 0 && !CommitEdit( 17265&& _ptCurrentCell.X != -1 17266&& ColumnEditable(_ptCurrentCell.X) 17270&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 17305Debug.Assert(_ptCurrentCell.X == -1); 17356Debug.Assert(_ptCurrentCell.X == -1); 17438if (_ptCurrentCell.X != -1) 17440int newX = _ptCurrentCell.X; 17441if (columnIndex == _ptCurrentCell.X) 17481else if (columnIndex < _ptCurrentCell.X) 17483newX = _ptCurrentCell.X - 1; 17486newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17487if (columnIndex == _ptCurrentCell.X) 17673if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17676if (rowIndexDeleted == _ptCurrentCell.Y) 17711Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17712newY = _ptCurrentCell.Y - 1; 17715newCurrentCell = new Point(_ptCurrentCell.X, newY); 17716if (rowIndexDeleted == _ptCurrentCell.Y) 17838if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17842_ptCurrentCellCache.X = _ptCurrentCell.X; 17843_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17983&& _ptCurrentCell.X == -1 18384if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 18386int oldCurrentCellX = _ptCurrentCell.X; 18387int oldCurrentCellY = _ptCurrentCell.Y; 18394fireRowLeave: hti._row != _ptCurrentCell.Y, 18395fireRowEnter: hti._row != _ptCurrentCell.Y, 18447if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 18558if (hti._row != _ptCurrentCell.Y) 18576else if (_ptCurrentCell.Y != -1) 18580_ptCurrentCell.X, 18581_ptCurrentCell.Y, 18838if (_ptCurrentCell.Y != -1 18839&& hti._row != _ptCurrentCell.Y 18840&& !CommitEditForOperation(_ptCurrentCell.X, hti._row, forCurrentCellChange: true)) 18917if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18924bool success = SetCurrentCellAddressCore(_ptCurrentCell.X, 19114if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 19120&& !Columns[_ptCurrentCell.X].ReadOnly 19121&& ColumnEditable(_ptCurrentCell.X) 19134if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 19415if (_ptCurrentCell.X != -1) 19419_ptCurrentCell.X, 19420_ptCurrentCell.Y, 19498if (_ptCurrentCell.X >= 0) 19501if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19508if (_ptCurrentCell.X == -1) 19513OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19516if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19519int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19523_ptCurrentCell.X, 20250Debug.Assert(dataGridViewCell.ColumnIndex == _ptCurrentCell.X); 20251Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 20264int leftEdge = GetColumnXFromIndex(_ptCurrentCell.X); 20267leftEdge -= Columns[_ptCurrentCell.X].Width - 1; 20270Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 20271Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 20274if (!Columns[_ptCurrentCell.X].Frozen) 20285if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 20310bool isFirstDisplayedColumn = FirstDisplayedColumnIndex == _ptCurrentCell.X; 20311bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20522if (_ptCurrentCell.X > -1 20612if (_ptCurrentCell.Y != -1) 20614nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20630if (_ptCurrentCell.X == -1) 20656if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20662int oldEdgeColumnIndex = _ptCurrentCell.X; 20663int oldEdgeRowIndex = _ptCurrentCell.Y; 20664if (_ptCurrentCell.X == -1 || _ptAnchorCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20677success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20685if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20690if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20697SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20698success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20708if (_ptCurrentCell.X == -1) 20728if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20733if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20740SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20741success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20753if (_ptCurrentCell.X == -1) 20779if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20784if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20792int oldEdgeColumnIndex = _ptCurrentCell.X; 20793int oldEdgeRowIndex = _ptCurrentCell.Y; 20811SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20814success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20823if (_ptCurrentCell.X == -1) 20849if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, forCurrentCellChange: true)) 20854if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20861SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20863_ptCurrentCell.X, 20883if (_ptCurrentCell.X == -1) 20905if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20910if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20919success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20927if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20932if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20938SetSelectedRowCore(_ptCurrentCell.Y, false); 20940success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20950if (_ptCurrentCell.X == -1) 20970if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20975if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20983success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20995if (_ptCurrentCell.X == -1) 21021if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21026if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21055success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 21064if (_ptCurrentCell.X == -1) 21090if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21095if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21103success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21119if (_ptCurrentCell.X == -1) 21141if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 21147if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21153if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21160int oldEdgeColumnIndex = _ptCurrentCell.X; 21161int oldEdgeRowIndex = _ptCurrentCell.Y; 21171success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 21179if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 21184if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21190if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21192SetSelectedRowCore(_ptCurrentCell.Y, false); 21197SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 21198SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 21201success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21211if (_ptCurrentCell.X == -1) 21231if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 21236if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21242if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21250SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 21253success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21265if (_ptCurrentCell.X == -1) 21291if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21296if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21302if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21331int oldEdgeColumnIndex = _ptCurrentCell.X; 21332int oldEdgeRowIndex = _ptCurrentCell.Y; 21350SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 21354success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 21363if (_ptCurrentCell.X == -1) 21389if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21394if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21400if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21408SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 21411success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21425if (_ptCurrentCell.X == -1) 21445if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 21450if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21456success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21465if (_ptCurrentCell.X == -1) 21491if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21496if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21502success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21560int oldEdgeColumnIndex = _ptCurrentCell.X; 21561int oldEdgeRowIndex = _ptCurrentCell.Y; 21609if (_ptCurrentCell.Y > -1 21610&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21613SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21617int oldEdgeColumnIndex = _ptCurrentCell.X; 21618int oldEdgeRowIndex = _ptCurrentCell.Y; 21630if (_ptCurrentCell.Y > -1 21631&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21647if (_ptCurrentCell.Y > -1 21648&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21685if (MultiSelect && _ptCurrentCell.X >= 0) 21724if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21741if (MultiSelect && _ptCurrentCell.X >= 0) 21743int oldEdgeColumnIndex = _ptCurrentCell.X; 21744int oldEdgeRowIndex = _ptCurrentCell.Y; 21779if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21816if (MultiSelect && _ptCurrentCell.Y >= 0) 21871if (_ptCurrentCell.X != -1) 21910int columnIndex = _ptCurrentCell.X; 21911int rowIndex = _ptCurrentCell.Y; 21953if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ModifierKeys == 0) 21955Debug.Assert(_ptCurrentCell.Y != -1); 21958|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21959|| !ColumnEditable(_ptCurrentCell.X)); 21961if (ColumnEditable(_ptCurrentCell.X) 21962&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21965bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21982if (_ptCurrentCell.X != -1) 21984DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22034int oldEdgeColumnIndex = _ptCurrentCell.X; 22035int oldEdgeRowIndex = _ptCurrentCell.Y; 22083if (_ptCurrentCell.Y > -1 22084&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22091int oldEdgeColumnIndex = _ptCurrentCell.X; 22092int oldEdgeRowIndex = _ptCurrentCell.Y; 22104if (_ptCurrentCell.Y > -1 22105&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22121if (_ptCurrentCell.Y > -1 22122&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22159if (MultiSelect && _ptCurrentCell.X >= 0) 22203if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 22220if (MultiSelect && _ptCurrentCell.X >= 0) 22222int oldEdgeColumnIndex = _ptCurrentCell.X; 22223int oldEdgeRowIndex = _ptCurrentCell.Y; 22258if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 22330if (_ptCurrentCell.X != -1) 22336&& ColumnEditable(_ptCurrentCell.X) 22337&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 22354bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22462if ((keyData & Keys.Alt) == Keys.Alt && AllowUserToResizeColumns && _ptCurrentCell.X != -1) 22466DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22471BeginKeyboardColumnResize(_ptCurrentCell.X); 22498if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22548if (_ptCurrentCell.X != -1) 22550dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 22574if (_ptCurrentCell.X == -1) 22595if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22600if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22608int oldEdgeColumnIndex = _ptCurrentCell.X; 22609int oldEdgeRowIndex = _ptCurrentCell.Y; 22626SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22629success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22635if (_ptCurrentCell.X == -1) 22656if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22661if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22667SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22668success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22685if (_ptCurrentCell.X == -1) 22706if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22711if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22738success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22744if (_ptCurrentCell.X == -1) 22765if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22770if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22777success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22794if (_ptCurrentCell.X == -1) 22815if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22820if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22825if (Columns[_ptCurrentCell.X].Selected) 22851int oldEdgeColumnIndex = _ptCurrentCell.X; 22852int oldEdgeRowIndex = _ptCurrentCell.Y; 22869SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22873success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22879if (_ptCurrentCell.X == -1) 22900if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22905if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22910if (Columns[_ptCurrentCell.X].Selected) 22918SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22921success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22936if (_ptCurrentCell.X == -1) 22957if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22962if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22967success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22998if (_ptCurrentCell.X == -1) 23016if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23022int oldEdgeColumnIndex = _ptCurrentCell.X; 23023int oldEdgeRowIndex = _ptCurrentCell.Y; 23024if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23038_ptCurrentCell.Y, 23046if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23051if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23057SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 23060_ptCurrentCell.Y, 23070if (_ptCurrentCell.X == -1) 23091if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 23096if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23102SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 23105_ptCurrentCell.Y, 23118if (_ptCurrentCell.X == -1) 23141if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23146if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23154success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23159if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23164if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23169SetSelectedColumnCore(_ptCurrentCell.X, false); 23171success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23178if (_ptCurrentCell.X == -1) 23194if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23199if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23206success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23216if (_ptCurrentCell.X == -1) 23234if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23239if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23245if (Columns[_ptCurrentCell.X].Selected) 23252int oldEdgeColumnIndex = _ptCurrentCell.X; 23253int oldEdgeRowIndex = _ptCurrentCell.Y; 23263success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23268if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23273if (_ptCurrentCell.X == -1 || IsInnerCellOutOfBounds(firstVisibleColumnIndex, firstVisibleRowIndex)) 23278if (Columns[_ptCurrentCell.X].Selected) 23280SetSelectedColumnCore(_ptCurrentCell.X, false); 23285SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 23286SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 23289success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23296if (_ptCurrentCell.X == -1) 23312if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23317if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23322if (Columns[_ptCurrentCell.X].Selected) 23330SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 23333success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23341if (_ptCurrentCell.X == -1) 23357if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 23362if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 23367success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23393if (_ptCurrentCell.Y == -1) 23403nextScreenVisibleRowIndex = _ptCurrentCell.Y; 23412if (!ScrollIntoView(_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 23419_ptCurrentCell.Y, 23450if (_ptCurrentCell.X == -1) 23483if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23488if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23496int oldEdgeColumnIndex = _ptCurrentCell.X; 23497int oldEdgeRowIndex = _ptCurrentCell.Y; 23514SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23517success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23522if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23527if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23555success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23559if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23564if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23577if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23591int oldEdgeColumnIndex = _ptCurrentCell.X; 23592int oldEdgeRowIndex = _ptCurrentCell.Y; 23604if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23612SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23616success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, !MultiSelect, false, false); 23620if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23625if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23630success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true, false, false); 23652if (_ptCurrentCell.Y == -1) 23662previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23698_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 23714if (_ptCurrentCell.X == -1) 23746if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23751if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23759int oldEdgeColumnIndex = _ptCurrentCell.X; 23760int oldEdgeRowIndex = _ptCurrentCell.Y; 23777SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23780SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23784if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23789if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23817SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23821if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23826if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23839if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23853int oldEdgeColumnIndex = _ptCurrentCell.X; 23854int oldEdgeRowIndex = _ptCurrentCell.Y; 23866if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23874SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23878SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, !MultiSelect, false, false); 23882if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23887if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23892SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true, false, false); 23936if (_ptCurrentCell.X != -1) 23938dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 23962if (_ptCurrentCell.X == -1) 23983if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23988if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23995int oldEdgeColumnIndex = _ptCurrentCell.X; 23996int oldEdgeRowIndex = _ptCurrentCell.Y; 24013SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 24016success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 24022if (_ptCurrentCell.X == -1) 24043if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 24048if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 24054SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 24055success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24072if (_ptCurrentCell.X == -1) 24093if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 24098if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 24125success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 24131if (_ptCurrentCell.X == -1) 24152if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 24157if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 24164success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24181if (_ptCurrentCell.X == -1) 24202if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 24207if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 24212if (Columns[_ptCurrentCell.X].Selected) 24245int oldEdgeColumnIndex = _ptCurrentCell.X; 24246int oldEdgeRowIndex = _ptCurrentCell.Y; 24258SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 24262success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 24268if (_ptCurrentCell.X == -1) 24289if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 24294if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 24299if (Columns[_ptCurrentCell.X].Selected) 24307SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 24310success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24325if (_ptCurrentCell.X == -1) 24346if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 24351if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 24356success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24387if (_ptCurrentCell.X == -1) 24403if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24408if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24421int oldEdgeColumnIndex = _ptCurrentCell.X; 24422int oldEdgeRowIndex = _ptCurrentCell.Y; 24430success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24436SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24437success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24444if (_ptCurrentCell.X == -1) 24460if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24465if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24471SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24472success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24482if (_ptCurrentCell.X == -1) 24498if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24503if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24518success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24523SetSelectedColumnCore(_ptCurrentCell.X, false); 24525success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24532if (_ptCurrentCell.X == -1) 24548if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24553if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24560success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24570if (_ptCurrentCell.X == -1) 24586if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24591if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24604if (Columns[_ptCurrentCell.X].Selected) 24611int oldEdgeColumnIndex = _ptCurrentCell.X; 24612int oldEdgeRowIndex = _ptCurrentCell.Y; 24622success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24627if (Columns[_ptCurrentCell.X].Selected) 24629SetSelectedColumnCore(_ptCurrentCell.X, false); 24634SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24635SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24638success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24645if (_ptCurrentCell.X == -1) 24661if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24666if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24671if (Columns[_ptCurrentCell.X].Selected) 24679SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24682success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24690if (_ptCurrentCell.X == -1) 24706if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24711if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24716success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24733if ((keyData & (Keys.Control | Keys.Shift | Keys.Alt)) == Keys.Shift && _ptCurrentCell.X != -1) 24752if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.X) 24764if (!Columns[_ptCurrentCell.X].Selected) 24766Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.X)); 24767SetSelectedColumnCore(_ptCurrentCell.X, true); 24779if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24791if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24793Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24794SetSelectedRowCore(_ptCurrentCell.Y, true); 25016if (_ptCurrentCell.Y != -1) 25018previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 25032if (_ptCurrentCell.X == -1) 25048if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25053if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25059int oldEdgeColumnIndex = _ptCurrentCell.X; 25060int oldEdgeRowIndex = _ptCurrentCell.Y; 25068SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 25072if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25077if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25083SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25084SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25090if (_ptCurrentCell.X == -1) 25104if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25109if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25115SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25116SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25124if (_ptCurrentCell.X == -1) 25143if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25148if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25161int oldEdgeColumnIndex = _ptCurrentCell.X; 25162int oldEdgeRowIndex = _ptCurrentCell.Y; 25174SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25177SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25182if (_ptCurrentCell.X == -1) 25201if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25206if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25212SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, selected: true); 25214_ptCurrentCell.X, 25230if (_ptCurrentCell.X == -1) 25246if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25251if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25259SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 25263if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25268if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25273SetSelectedRowCore(_ptCurrentCell.Y, false); 25275SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25281if (_ptCurrentCell.X == -1) 25295if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25300if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25307SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25315if (_ptCurrentCell.X == -1) 25334if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25339if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25366SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25371if (_ptCurrentCell.X == -1) 25390if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25395if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25402SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25414if (_ptCurrentCell.X == -1) 25430if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25435if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25441if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25448int oldEdgeColumnIndex = _ptCurrentCell.X; 25449int oldEdgeRowIndex = _ptCurrentCell.Y; 25459SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 25463if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25468if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25473if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25475SetSelectedRowCore(_ptCurrentCell.Y, false); 25480SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25481SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25484SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25490if (_ptCurrentCell.X == -1) 25504if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25509if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25514if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25522SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25525SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25533if (_ptCurrentCell.X == -1) 25552if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25557if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25562if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25588int oldEdgeColumnIndex = _ptCurrentCell.X; 25589int oldEdgeRowIndex = _ptCurrentCell.Y; 25606SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25610SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25615if (_ptCurrentCell.X == -1) 25634if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25639if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25644if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25652SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25655SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25665if (_ptCurrentCell.X == -1) 25684if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, forCurrentCellChange: true)) 25689if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25694SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25699if (_ptCurrentCell.X == -1) 25718if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25723if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25728SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25745if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ColumnEditable(_ptCurrentCell.X)) 25750if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25754bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25767object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25785InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25826_ptCurrentCell.Y, 25827_ptCurrentCell.X, 25840dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25843return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25865dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25868return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25947if (_ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 25949Debug.Assert(_ptCurrentCell.Y != -1); 25951DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26491if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26493forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26494forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26509if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26511forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26512forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26523if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26525forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26526forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26690if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26751if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26753forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26754forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26780if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26782forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26783forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26832if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 27266if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 27271_ptCurrentCell.X = columnIndex; 27272_ptCurrentCell.Y = rowIndex; 27286int oldCurrentCellX = _ptCurrentCell.X; 27287int oldCurrentCellY = _ptCurrentCell.Y; 27332Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 27333Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 27405_ptCurrentCell.X = columnIndex; 27406_ptCurrentCell.Y = rowIndex; 27427OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 27436if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 27442InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 27443if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 27445InvalidateCellPrivate(-1, _ptCurrentCell.Y); 27449&& _ptCurrentCell.X != -1 27467if (_ptCurrentCell.X != -1) 27469AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27496int oldCurrentCellX = _ptCurrentCell.X; 27497int oldCurrentCellY = _ptCurrentCell.Y; 27537Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 27538Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 27562if (_ptCurrentCell.X != -1) 27564_ptCurrentCell.X = -1; 27565_ptCurrentCell.Y = -1; 28702_ptCurrentCellCache.X = _ptCurrentCell.X; 28703_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28978if (_ptCurrentCell.X != -1) 28980dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 28990if (_ptCurrentCell.Y != -1) 28992nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 29000if (_ptCurrentCell.X == -1) 29013targetRowIndex = _ptCurrentCell.Y; 29028if (_ptCurrentCell.X == -1) 29051if (_ptCurrentCell.X == -1) 29074if (_ptCurrentCell.X == -1) 29085if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 29105if (_ptCurrentCell.X == -1) 29139if (_ptCurrentCell.X != -1) 29141dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 29151if (_ptCurrentCell.Y != -1) 29153previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 29169if (_ptCurrentCell.X == -1) 29182targetRowIndex = _ptCurrentCell.Y; 29197if (_ptCurrentCell.X == -1) 29220if (_ptCurrentCell.X == -1) 29243if (_ptCurrentCell.X == -1) 29254if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 29274if (_ptCurrentCell.X == -1) 29580PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false);