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); 3063if (value && _ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 3135if (_ptCurrentCell.X != -1 && !SetCurrentCellAddressCore( 3887Debug.Assert(_ptCurrentCell.Y >= 0); 3888InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3895Debug.Assert(_ptCurrentCell.Y >= 0); 3896InvalidateCellPrivate(-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); 2685((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2705if (_toolTipControl.Activated && _ptToolTipCell == _ptCurrentCell) 2722InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3041if (_ptCurrentCell.X != -1) 3043Debug.Assert(_ptCurrentCell.Y != -1); 3045int oldCurrentCellX = _ptCurrentCell.X; 3103_ptCurrentCell.X, 3104_ptCurrentCell.Y, 3129InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3133else if (_ptCurrentCell.X == -1 && Focused) 3203int oldCurrentCellX = _ptCurrentCell.X; 3208if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3236if (_ptCurrentCell.Y > -1) 3238InvalidateRowPrivate(_ptCurrentCell.Y); 3242DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3259if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3267if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3307if (_ptCurrentCell.X > -1) 3353if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3422if (_ptCurrentCell.X != -1 && SelectionMode == DataGridViewSelectionMode.FullRowSelect) 3424InvalidateCellPrivate(_ptCurrentCell.X, -1); 3760Debug.Assert(_ptCurrentCell.X > -1); 3763if (_ptCurrentCell.X == -1) 3768OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3773if (_ptCurrentCell.X == -1) 3778OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3789if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3791InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3799if (_ptCurrentCell.X == -1) 3804if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3808if (_ptCurrentCell.X == -1) 3815_ptCurrentCell.X, 3816_ptCurrentCell.Y, 3823if (_ptCurrentCell.X == -1) 3828OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3831if (_ptCurrentCell.X == -1) 3838_ptCurrentCell.X, 3839_ptCurrentCell.Y, 3849if (_ptCurrentCell.X == -1) 3854OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3859if (_ptCurrentCell.X == -1 || !IsCurrentCellInEditMode) 3875Debug.Assert(_ptCurrentCell.X > -1); 3876if (_ptCurrentCell.X == -1) 3881if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3883if (_ptCurrentCell.X == -1) 3890_ptCurrentCell.X, 3891_ptCurrentCell.Y, 3915if (_ptCurrentCell.X == -1) 3922_ptCurrentCell.X, 3923_ptCurrentCell.Y, 3957if (_ptCurrentCell.X == -1) 3962OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4022Debug.Assert(_ptCurrentCell.X > -1); 4023if (_ptCurrentCell.X == -1) 4028int columnIndex = _ptCurrentCell.X; 4029int rowIndex = _ptCurrentCell.Y; 4073fireRowLeave: _ptCurrentCell.Y != rowIndex, 4074fireRowEnter: _ptCurrentCell.Y != rowIndex, 4083if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4086int columnIndexTmp = _ptCurrentCell.X; 4087int rowIndexTmp = _ptCurrentCell.Y; 4138forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 4158if (forCurrentCellChange && _ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 5477Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5737Debug.Assert(_ptCurrentCell.X != -1); 5950Debug.Assert(_ptCurrentCell.X != -1); 5960Debug.Assert(_ptCurrentCell.X != -1); 6162if (_ptCurrentCell.X == -1) 6170int curRowIndex = _ptCurrentCell.Y; 6171int curColIndex = _ptCurrentCell.X; 6215if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6239InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6266InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8818|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 8870if (((_ptAnchorCell.X != -1 && !Columns[_ptAnchorCell.X].Frozen) || (_ptCurrentCell.X != -1 && !Columns[_ptCurrentCell.X].Frozen)) 9686_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9696Debug.Assert(_ptCurrentCell.X == dataGridViewCell.ColumnIndex); 9697dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9707_ptCurrentCell.X, 9708_ptCurrentCell.Y, 9727object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9732dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 9739_ptCurrentCell.X, 9740_ptCurrentCell.Y, 10110&& _ptCurrentCell.X != -1) 12051if (_ptCurrentCell.X == -1) 12068if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12070Point ptOriginalCurrentCell = _ptCurrentCell; 12073forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12074forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12080if (_ptCurrentCell != ptOriginalCurrentCell) 12093if (_ptCurrentCell.X == -1 && dataGridViewLastVisibleColumn is not null) 12109if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 12155int oldEdgeColumnIndex = _ptCurrentCell.X; 12156int oldEdgeRowIndex = _ptCurrentCell.Y; 12345int oldEdgeColumnIndex = _ptCurrentCell.X; 12346int oldEdgeRowIndex = _ptCurrentCell.Y; 12551int oldEdgeColumnIndex = _ptCurrentCell.X; 12552int oldEdgeRowIndex = _ptCurrentCell.Y; 12765int oldEdgeColumnIndex = _ptCurrentCell.X; 12766int oldEdgeRowIndex = _ptCurrentCell.Y; 12767if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12790if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12824&& _ptCurrentCell.X == dataGridViewCell.ColumnIndex 12825&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 12832&& ColumnEditable(_ptCurrentCell.X) 13700if (rowIndex > -1 && hti._col != _ptCurrentCell.X) 13703int oldCurrentCellX = _ptCurrentCell.X; 13704int oldCurrentCellY = _ptCurrentCell.Y; 13710fireRowLeave: rowIndex != _ptCurrentCell.Y, 13711fireRowEnter: rowIndex != _ptCurrentCell.Y, 13842if (hti._col != _ptCurrentCell.X) 13864else if (_ptCurrentCell.X != -1) 13868_ptCurrentCell.X, 13869_ptCurrentCell.Y, 14129if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14211if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X) 14213if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14220_ptCurrentCell.Y, 14439&& dataGridViewColumn.Index == _ptCurrentCell.X 14445&& ColumnEditable(_ptCurrentCell.X) 14446&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14522PositionEditingControl(_ptCurrentCell.X != e.Column.Index, true, false); 14550|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14581InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14584if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 14725else if (dataGridViewColumn.Visible && _ptCurrentCell.X == dataGridViewColumn.Index) 14746if (_ptCurrentCell.X == dataGridViewColumn.Index 14786if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 14794Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14808if (_ptCurrentCell.Y == rowIndex 14846if (_ptCurrentCell.X == dataGridViewCell.ColumnIndex 14847&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 14963if (Focused && EditMode == DataGridViewEditMode.EditOnEnter && _ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15016if (_ptCurrentCell.X > -1) 15024_ptCurrentCell.X, 15025_ptCurrentCell.Y, 15028if (_ptCurrentCell.X == -1) 15033OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15038InvalidateCellPrivate(_ptCurrentCell.X, -1); 15047if (_ptCurrentCell.X > -1 && !IsCurrentCellInEditMode) 15053if (_ptCurrentCell.X > -1 && CurrentCellInternal.EditType is null && !_dataGridViewOper[OperationInMouseDown]) 15058InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15067InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15190if (_ptCurrentCell.X != -1) 15192InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15199&& _ptCurrentCell.X > -1) 15204AccessibilityNotifyCurrentCellChanged(_ptCurrentCell); 15232if (_ptCurrentCell.X == -1) 15238ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15274Debug.Assert(_ptCurrentCell.X == -1); 15312Debug.Assert(_ptCurrentCell.X == -1); 15352Debug.Assert(_ptCurrentCell.X == -1); 15411if (_ptCurrentCell.X != -1) 15413newCurrentCell = new Point(columnIndexInserted <= _ptCurrentCell.X ? _ptCurrentCell.X + 1 : _ptCurrentCell.X, 15414_ptCurrentCell.Y); 15531if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15533newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15614if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15616newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15679if (_ptCurrentCell.X != -1) 15683if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 15686_ = Rows[_ptCurrentCell.Y]; 15687CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 15691dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 15738if (_ptCurrentCell.X != -1) 15742if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 15745_ = Rows[_ptCurrentCell.Y]; 15746CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 15750dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 15772if (_ptCurrentCell.X != -1) 15776if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 15779_ = Rows[_ptCurrentCell.Y]; 15780CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 15784dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 15815if (_ptCurrentCell.X > -1 && !_dataGridViewState1[State1_LeavingWithTabKey]) 15818OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15819if (_ptCurrentCell.X == -1) 15824OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15832if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15834InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15848if (_ptCurrentCell.X != -1) 15850InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15878|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 16510if (_ptCurrentCell.X >= 0 && !CommitEdit( 16553if (_ptCurrentCell.X >= 0 && !CommitEdit( 16862&& _ptCurrentCell.X != -1 16863&& ColumnEditable(_ptCurrentCell.X) 16867&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16902Debug.Assert(_ptCurrentCell.X == -1); 16953Debug.Assert(_ptCurrentCell.X == -1); 17035if (_ptCurrentCell.X != -1) 17037int newX = _ptCurrentCell.X; 17038if (columnIndex == _ptCurrentCell.X) 17065else if (columnIndex < _ptCurrentCell.X) 17067newX = _ptCurrentCell.X - 1; 17070newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17071if (columnIndex == _ptCurrentCell.X) 17257if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17260if (rowIndexDeleted == _ptCurrentCell.Y) 17281Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17282newY = _ptCurrentCell.Y - 1; 17285newCurrentCell = new Point(_ptCurrentCell.X, newY); 17286if (rowIndexDeleted == _ptCurrentCell.Y) 17408if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17412_ptCurrentCellCache.X = _ptCurrentCell.X; 17413_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17553&& _ptCurrentCell.X == -1 17954if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 17956int oldCurrentCellX = _ptCurrentCell.X; 17957int oldCurrentCellY = _ptCurrentCell.Y; 17964fireRowLeave: hti._row != _ptCurrentCell.Y, 17965fireRowEnter: hti._row != _ptCurrentCell.Y, 18017if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 18128if (hti._row != _ptCurrentCell.Y) 18146else if (_ptCurrentCell.Y != -1) 18150_ptCurrentCell.X, 18151_ptCurrentCell.Y, 18408if (_ptCurrentCell.Y != -1 18409&& hti._row != _ptCurrentCell.Y 18410&& !CommitEditForOperation(_ptCurrentCell.X, hti._row, forCurrentCellChange: true)) 18487if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18494bool success = SetCurrentCellAddressCore(_ptCurrentCell.X, 18684if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18690&& !Columns[_ptCurrentCell.X].ReadOnly 18691&& ColumnEditable(_ptCurrentCell.X) 18704if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18985if (_ptCurrentCell.X != -1) 18989_ptCurrentCell.X, 18990_ptCurrentCell.Y, 19068if (_ptCurrentCell.X >= 0) 19071if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19078if (_ptCurrentCell.X == -1) 19083OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19086if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19089int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19093_ptCurrentCell.X, 19809Debug.Assert(dataGridViewCell.ColumnIndex == _ptCurrentCell.X); 19810Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 19823int leftEdge = GetColumnXFromIndex(_ptCurrentCell.X); 19826leftEdge -= Columns[_ptCurrentCell.X].Width - 1; 19829Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19830Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19833if (!Columns[_ptCurrentCell.X].Frozen) 19844if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19869bool isFirstDisplayedColumn = FirstDisplayedColumnIndex == _ptCurrentCell.X; 19870bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20081if (_ptCurrentCell.X > -1 20166if (_ptCurrentCell.Y != -1) 20168nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20184if (_ptCurrentCell.X == -1) 20210if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20216int oldEdgeColumnIndex = _ptCurrentCell.X; 20217int oldEdgeRowIndex = _ptCurrentCell.Y; 20218if (_ptCurrentCell.X == -1 || _ptAnchorCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20231success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20239if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20244if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20251SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20252success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20262if (_ptCurrentCell.X == -1) 20282if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20287if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20294SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20295success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20307if (_ptCurrentCell.X == -1) 20333if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20338if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20346int oldEdgeColumnIndex = _ptCurrentCell.X; 20347int oldEdgeRowIndex = _ptCurrentCell.Y; 20365SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20368success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20377if (_ptCurrentCell.X == -1) 20403if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, forCurrentCellChange: true)) 20408if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20415SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20417_ptCurrentCell.X, 20437if (_ptCurrentCell.X == -1) 20459if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20464if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20473success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20481if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20486if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20492SetSelectedRowCore(_ptCurrentCell.Y, false); 20494success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20504if (_ptCurrentCell.X == -1) 20524if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20529if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20537success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20549if (_ptCurrentCell.X == -1) 20575if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20580if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20609success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20618if (_ptCurrentCell.X == -1) 20644if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20649if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20657success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20673if (_ptCurrentCell.X == -1) 20695if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20701if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20707if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20714int oldEdgeColumnIndex = _ptCurrentCell.X; 20715int oldEdgeRowIndex = _ptCurrentCell.Y; 20725success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20733if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20738if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20744if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20746SetSelectedRowCore(_ptCurrentCell.Y, false); 20751SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20752SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20755success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20765if (_ptCurrentCell.X == -1) 20785if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20790if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20796if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20804SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20807success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20819if (_ptCurrentCell.X == -1) 20845if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20850if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20856if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20885int oldEdgeColumnIndex = _ptCurrentCell.X; 20886int oldEdgeRowIndex = _ptCurrentCell.Y; 20904SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20908success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20917if (_ptCurrentCell.X == -1) 20943if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20948if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20954if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20962SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20965success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20979if (_ptCurrentCell.X == -1) 20999if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 21004if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21010success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21019if (_ptCurrentCell.X == -1) 21045if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21050if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21056success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21114int oldEdgeColumnIndex = _ptCurrentCell.X; 21115int oldEdgeRowIndex = _ptCurrentCell.Y; 21163if (_ptCurrentCell.Y > -1 21164&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21167SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21171int oldEdgeColumnIndex = _ptCurrentCell.X; 21172int oldEdgeRowIndex = _ptCurrentCell.Y; 21184if (_ptCurrentCell.Y > -1 21185&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21201if (_ptCurrentCell.Y > -1 21202&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21239if (MultiSelect && _ptCurrentCell.X >= 0) 21278if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21295if (MultiSelect && _ptCurrentCell.X >= 0) 21297int oldEdgeColumnIndex = _ptCurrentCell.X; 21298int oldEdgeRowIndex = _ptCurrentCell.Y; 21333if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21370if (MultiSelect && _ptCurrentCell.Y >= 0) 21425if (_ptCurrentCell.X != -1) 21464int columnIndex = _ptCurrentCell.X; 21465int rowIndex = _ptCurrentCell.Y; 21507if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ModifierKeys == 0) 21509Debug.Assert(_ptCurrentCell.Y != -1); 21512|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21513|| !ColumnEditable(_ptCurrentCell.X)); 21515if (ColumnEditable(_ptCurrentCell.X) 21516&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21519bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21536if (_ptCurrentCell.X != -1) 21538DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 21588int oldEdgeColumnIndex = _ptCurrentCell.X; 21589int oldEdgeRowIndex = _ptCurrentCell.Y; 21637if (_ptCurrentCell.Y > -1 21638&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21645int oldEdgeColumnIndex = _ptCurrentCell.X; 21646int oldEdgeRowIndex = _ptCurrentCell.Y; 21658if (_ptCurrentCell.Y > -1 21659&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21675if (_ptCurrentCell.Y > -1 21676&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21713if (MultiSelect && _ptCurrentCell.X >= 0) 21757if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21774if (MultiSelect && _ptCurrentCell.X >= 0) 21776int oldEdgeColumnIndex = _ptCurrentCell.X; 21777int oldEdgeRowIndex = _ptCurrentCell.Y; 21812if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21884if (_ptCurrentCell.X != -1) 21890&& ColumnEditable(_ptCurrentCell.X) 21891&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21908bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22011if ((keyData & Keys.Alt) == Keys.Alt && AllowUserToResizeColumns && _ptCurrentCell.X != -1) 22015DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22020BeginKeyboardColumnResize(_ptCurrentCell.X); 22047if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22089if (_ptCurrentCell.X != -1) 22091dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 22115if (_ptCurrentCell.X == -1) 22136if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22141if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22149int oldEdgeColumnIndex = _ptCurrentCell.X; 22150int oldEdgeRowIndex = _ptCurrentCell.Y; 22167SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22170success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22176if (_ptCurrentCell.X == -1) 22197if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22202if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22208SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22209success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22226if (_ptCurrentCell.X == -1) 22247if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22252if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22279success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22285if (_ptCurrentCell.X == -1) 22306if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22311if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22318success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22335if (_ptCurrentCell.X == -1) 22356if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22361if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22366if (Columns[_ptCurrentCell.X].Selected) 22392int oldEdgeColumnIndex = _ptCurrentCell.X; 22393int oldEdgeRowIndex = _ptCurrentCell.Y; 22410SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22414success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22420if (_ptCurrentCell.X == -1) 22441if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22446if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22451if (Columns[_ptCurrentCell.X].Selected) 22459SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22462success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22477if (_ptCurrentCell.X == -1) 22498if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22503if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22508success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22539if (_ptCurrentCell.X == -1) 22557if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22563int oldEdgeColumnIndex = _ptCurrentCell.X; 22564int oldEdgeRowIndex = _ptCurrentCell.Y; 22565if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22579_ptCurrentCell.Y, 22587if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22592if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22598SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22601_ptCurrentCell.Y, 22611if (_ptCurrentCell.X == -1) 22632if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22637if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22643SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22646_ptCurrentCell.Y, 22659if (_ptCurrentCell.X == -1) 22682if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22687if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22695success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22700if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22705if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22710SetSelectedColumnCore(_ptCurrentCell.X, false); 22712success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22719if (_ptCurrentCell.X == -1) 22735if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22740if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22747success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22757if (_ptCurrentCell.X == -1) 22775if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22780if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22786if (Columns[_ptCurrentCell.X].Selected) 22793int oldEdgeColumnIndex = _ptCurrentCell.X; 22794int oldEdgeRowIndex = _ptCurrentCell.Y; 22804success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22809if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22814if (_ptCurrentCell.X == -1 || IsInnerCellOutOfBounds(firstVisibleColumnIndex, firstVisibleRowIndex)) 22819if (Columns[_ptCurrentCell.X].Selected) 22821SetSelectedColumnCore(_ptCurrentCell.X, false); 22826SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22827SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22830success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22837if (_ptCurrentCell.X == -1) 22853if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22858if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22863if (Columns[_ptCurrentCell.X].Selected) 22871SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22874success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22882if (_ptCurrentCell.X == -1) 22898if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22903if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22908success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22937if (_ptCurrentCell.Y == -1) 22947nextScreenVisibleRowIndex = _ptCurrentCell.Y; 22956if (!ScrollIntoView(_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 22963_ptCurrentCell.Y, 22994if (_ptCurrentCell.X == -1) 23027if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23032if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23040int oldEdgeColumnIndex = _ptCurrentCell.X; 23041int oldEdgeRowIndex = _ptCurrentCell.Y; 23058SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23061success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23066if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23071if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23099success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23103if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23108if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23121if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23135int oldEdgeColumnIndex = _ptCurrentCell.X; 23136int oldEdgeRowIndex = _ptCurrentCell.Y; 23148if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23156SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23160success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, !MultiSelect, false, false); 23164if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23169if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23174success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true, false, false); 23198if (_ptCurrentCell.Y == -1) 23208previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23238_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 23254if (_ptCurrentCell.X == -1) 23286if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23291if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23299int oldEdgeColumnIndex = _ptCurrentCell.X; 23300int oldEdgeRowIndex = _ptCurrentCell.Y; 23317SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23320SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23324if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23329if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23357SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23361if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23366if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23379if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23393int oldEdgeColumnIndex = _ptCurrentCell.X; 23394int oldEdgeRowIndex = _ptCurrentCell.Y; 23406if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23414SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23418SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, !MultiSelect, false, false); 23422if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23427if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23432SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true, false, false); 23468if (_ptCurrentCell.X != -1) 23470dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 23494if (_ptCurrentCell.X == -1) 23515if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23520if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23527int oldEdgeColumnIndex = _ptCurrentCell.X; 23528int oldEdgeRowIndex = _ptCurrentCell.Y; 23545SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23548success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23554if (_ptCurrentCell.X == -1) 23575if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23580if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23586SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23587success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23604if (_ptCurrentCell.X == -1) 23625if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23630if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23657success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23663if (_ptCurrentCell.X == -1) 23684if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23689if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23696success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23713if (_ptCurrentCell.X == -1) 23734if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23739if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23744if (Columns[_ptCurrentCell.X].Selected) 23777int oldEdgeColumnIndex = _ptCurrentCell.X; 23778int oldEdgeRowIndex = _ptCurrentCell.Y; 23790SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23794success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23800if (_ptCurrentCell.X == -1) 23821if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23826if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23831if (Columns[_ptCurrentCell.X].Selected) 23839SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23842success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23857if (_ptCurrentCell.X == -1) 23878if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23883if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23888success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23919if (_ptCurrentCell.X == -1) 23935if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23940if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23953int oldEdgeColumnIndex = _ptCurrentCell.X; 23954int oldEdgeRowIndex = _ptCurrentCell.Y; 23962success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23968SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23969success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23976if (_ptCurrentCell.X == -1) 23992if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23997if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24003SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24004success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24014if (_ptCurrentCell.X == -1) 24030if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24035if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24050success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24055SetSelectedColumnCore(_ptCurrentCell.X, false); 24057success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24064if (_ptCurrentCell.X == -1) 24080if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24085if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24092success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24102if (_ptCurrentCell.X == -1) 24118if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24123if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24136if (Columns[_ptCurrentCell.X].Selected) 24143int oldEdgeColumnIndex = _ptCurrentCell.X; 24144int oldEdgeRowIndex = _ptCurrentCell.Y; 24154success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24159if (Columns[_ptCurrentCell.X].Selected) 24161SetSelectedColumnCore(_ptCurrentCell.X, false); 24166SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24167SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24170success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24177if (_ptCurrentCell.X == -1) 24193if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24198if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24203if (Columns[_ptCurrentCell.X].Selected) 24211SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24214success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24222if (_ptCurrentCell.X == -1) 24238if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24243if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24248success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24265if ((keyData & (Keys.Control | Keys.Shift | Keys.Alt)) == Keys.Shift && _ptCurrentCell.X != -1) 24284if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.X) 24296if (!Columns[_ptCurrentCell.X].Selected) 24298Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.X)); 24299SetSelectedColumnCore(_ptCurrentCell.X, true); 24311if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24323if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24325Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24326SetSelectedRowCore(_ptCurrentCell.Y, true); 24548if (_ptCurrentCell.Y != -1) 24550previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24564if (_ptCurrentCell.X == -1) 24580if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24585if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24591int oldEdgeColumnIndex = _ptCurrentCell.X; 24592int oldEdgeRowIndex = _ptCurrentCell.Y; 24600SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24604if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24609if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24615SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24616SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24622if (_ptCurrentCell.X == -1) 24636if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24641if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24647SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24648SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24656if (_ptCurrentCell.X == -1) 24675if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24680if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24693int oldEdgeColumnIndex = _ptCurrentCell.X; 24694int oldEdgeRowIndex = _ptCurrentCell.Y; 24706SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 24709SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24714if (_ptCurrentCell.X == -1) 24733if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24738if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24744SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, selected: true); 24746_ptCurrentCell.X, 24762if (_ptCurrentCell.X == -1) 24778if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24783if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24791SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24795if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24800if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24805SetSelectedRowCore(_ptCurrentCell.Y, false); 24807SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24813if (_ptCurrentCell.X == -1) 24827if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24832if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24839SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24847if (_ptCurrentCell.X == -1) 24866if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24871if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24898SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24903if (_ptCurrentCell.X == -1) 24922if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24927if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24934SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 24946if (_ptCurrentCell.X == -1) 24962if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24967if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24973if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24980int oldEdgeColumnIndex = _ptCurrentCell.X; 24981int oldEdgeRowIndex = _ptCurrentCell.Y; 24991SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24995if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25000if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25005if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25007SetSelectedRowCore(_ptCurrentCell.Y, false); 25012SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25013SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25016SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25022if (_ptCurrentCell.X == -1) 25036if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25041if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25046if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25054SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25057SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25065if (_ptCurrentCell.X == -1) 25084if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25089if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25094if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25120int oldEdgeColumnIndex = _ptCurrentCell.X; 25121int oldEdgeRowIndex = _ptCurrentCell.Y; 25138SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25142SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25147if (_ptCurrentCell.X == -1) 25166if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25171if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25176if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25184SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25187SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25197if (_ptCurrentCell.X == -1) 25216if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, forCurrentCellChange: true)) 25221if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25226SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25231if (_ptCurrentCell.X == -1) 25250if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25255if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25260SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25277if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ColumnEditable(_ptCurrentCell.X)) 25282if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25286bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25299object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25317InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25358_ptCurrentCell.Y, 25359_ptCurrentCell.X, 25372dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25375return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25397dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25400return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25479if (_ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 25481Debug.Assert(_ptCurrentCell.Y != -1); 25483DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26018if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26020forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26021forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26036if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26038forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26039forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26050if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26052forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26053forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26217if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26278if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26280forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26281forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26307if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26309forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26310forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26359if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26792if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26797_ptCurrentCell.X = columnIndex; 26798_ptCurrentCell.Y = rowIndex; 26812int oldCurrentCellX = _ptCurrentCell.X; 26813int oldCurrentCellY = _ptCurrentCell.Y; 26858Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 26859Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 26931_ptCurrentCell.X = columnIndex; 26932_ptCurrentCell.Y = rowIndex; 26953OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26962if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 26968InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26969if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 26971InvalidateCellPrivate(-1, _ptCurrentCell.Y); 26975&& _ptCurrentCell.X != -1 26993if (_ptCurrentCell.X != -1) 26995AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27022int oldCurrentCellX = _ptCurrentCell.X; 27023int oldCurrentCellY = _ptCurrentCell.Y; 27063Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 27064Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 27088if (_ptCurrentCell.X != -1) 27090_ptCurrentCell.X = -1; 27091_ptCurrentCell.Y = -1; 28228_ptCurrentCellCache.X = _ptCurrentCell.X; 28229_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28504if (_ptCurrentCell.X != -1) 28506dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 28516if (_ptCurrentCell.Y != -1) 28518nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28526if (_ptCurrentCell.X == -1) 28539targetRowIndex = _ptCurrentCell.Y; 28554if (_ptCurrentCell.X == -1) 28577if (_ptCurrentCell.X == -1) 28600if (_ptCurrentCell.X == -1) 28611if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28631if (_ptCurrentCell.X == -1) 28665if (_ptCurrentCell.X != -1) 28667dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 28677if (_ptCurrentCell.Y != -1) 28679previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28695if (_ptCurrentCell.X == -1) 28708targetRowIndex = _ptCurrentCell.Y; 28723if (_ptCurrentCell.X == -1) 28746if (_ptCurrentCell.X == -1) 28769if (_ptCurrentCell.X == -1) 28780if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28800if (_ptCurrentCell.X == -1) 29106PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false);