1 write to _ptCurrentCell
System.Windows.Forms (1)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
471_ptCurrentCell = new Point(-1, -1);
944 references to _ptCurrentCell
System.Windows.Forms (944)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (49)
1131if (_ptCurrentCell.X != -1 && ColumnEditable(_ptCurrentCell.X)) 1136if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y)) 1708if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1713Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1714Debug.Assert(_ptCurrentCell.X < Columns.Count); 1715Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1716DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1717return dataGridViewRow.Cells[_ptCurrentCell.X]; 1721if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1722|| (value is null && _ptCurrentCell.X != -1)) 1776public Point CurrentCellAddress => _ptCurrentCell; 1782Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 1783Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1784DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1786DataGridViewCell dataGridViewCell = dataGridViewRow.Cells[_ptCurrentCell.X]; 1787Debug.Assert(IsSharedCellVisible(dataGridViewCell, _ptCurrentCell.Y)); 1796if (_ptCurrentCell.X == -1) 1801Debug.Assert(_ptCurrentCell.Y != -1); 1803bool previousVisibleColumnExists = (Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1804bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1814if (_ptCurrentCell.X == -1) 1819Debug.Assert(_ptCurrentCell.Y != -1); 1821bool nextVisibleColumnExists = (Columns.GetNextColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1822bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1832if (_ptCurrentCell.X == -1) 1837Debug.Assert(_ptCurrentCell.Y != -1); 1850if (_ptCurrentCell.X == -1) 1855Debug.Assert(_ptCurrentCell.Y >= 0); 1856Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1858return Rows[_ptCurrentCell.Y]; 2488if (_ptCurrentCell.X >= 0 2568if (_ptCurrentCell.X >= 0 2745&& !Columns[_ptCurrentCell.X].Frozen 2850=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 2901if (RowHeadersVisible && ShowEditingIcon && _ptCurrentCell.Y >= 0) 2904InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3071if (value && _ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 3143if (_ptCurrentCell.X != -1 && !SetCurrentCellAddressCore( 3895Debug.Assert(_ptCurrentCell.Y >= 0); 3896InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3903Debug.Assert(_ptCurrentCell.Y >= 0); 3904InvalidateCellPrivate(-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))) 16507if (_ptCurrentCell.X >= 0 && !CommitEdit( 16550if (_ptCurrentCell.X >= 0 && !CommitEdit( 16859&& _ptCurrentCell.X != -1 16860&& ColumnEditable(_ptCurrentCell.X) 16864&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16899Debug.Assert(_ptCurrentCell.X == -1); 16950Debug.Assert(_ptCurrentCell.X == -1); 17032if (_ptCurrentCell.X != -1) 17034int newX = _ptCurrentCell.X; 17035if (columnIndex == _ptCurrentCell.X) 17062else if (columnIndex < _ptCurrentCell.X) 17064newX = _ptCurrentCell.X - 1; 17067newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17068if (columnIndex == _ptCurrentCell.X) 17254if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17257if (rowIndexDeleted == _ptCurrentCell.Y) 17278Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17279newY = _ptCurrentCell.Y - 1; 17282newCurrentCell = new Point(_ptCurrentCell.X, newY); 17283if (rowIndexDeleted == _ptCurrentCell.Y) 17405if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17409_ptCurrentCellCache.X = _ptCurrentCell.X; 17410_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17550&& _ptCurrentCell.X == -1 17951if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 17953int oldCurrentCellX = _ptCurrentCell.X; 17954int oldCurrentCellY = _ptCurrentCell.Y; 17961fireRowLeave: hti._row != _ptCurrentCell.Y, 17962fireRowEnter: hti._row != _ptCurrentCell.Y, 18014if (_ptCurrentCell.X == -1 && lastVisibleRowIndex != -1) 18125if (hti._row != _ptCurrentCell.Y) 18143else if (_ptCurrentCell.Y != -1) 18147_ptCurrentCell.X, 18148_ptCurrentCell.Y, 18405if (_ptCurrentCell.Y != -1 18406&& hti._row != _ptCurrentCell.Y 18407&& !CommitEditForOperation(_ptCurrentCell.X, hti._row, forCurrentCellChange: true)) 18484if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18491bool success = SetCurrentCellAddressCore(_ptCurrentCell.X, 18681if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18687&& !Columns[_ptCurrentCell.X].ReadOnly 18688&& ColumnEditable(_ptCurrentCell.X) 18701if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18982if (_ptCurrentCell.X != -1) 18986_ptCurrentCell.X, 18987_ptCurrentCell.Y, 19065if (_ptCurrentCell.X >= 0) 19068if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19075if (_ptCurrentCell.X == -1) 19080OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19083if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19086int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19090_ptCurrentCell.X, 19803Debug.Assert(dataGridViewCell.ColumnIndex == _ptCurrentCell.X); 19804Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 19817int leftEdge = GetColumnXFromIndex(_ptCurrentCell.X); 19820leftEdge -= Columns[_ptCurrentCell.X].Width - 1; 19823Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19824Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19827if (!Columns[_ptCurrentCell.X].Frozen) 19838if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19863bool isFirstDisplayedColumn = FirstDisplayedColumnIndex == _ptCurrentCell.X; 19864bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20075if (_ptCurrentCell.X > -1 20160if (_ptCurrentCell.Y != -1) 20162nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20178if (_ptCurrentCell.X == -1) 20204if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20210int oldEdgeColumnIndex = _ptCurrentCell.X; 20211int oldEdgeRowIndex = _ptCurrentCell.Y; 20212if (_ptCurrentCell.X == -1 || _ptAnchorCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20225success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20233if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20238if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20245SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20246success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20256if (_ptCurrentCell.X == -1) 20276if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20281if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20288SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20289success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20301if (_ptCurrentCell.X == -1) 20327if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20332if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20340int oldEdgeColumnIndex = _ptCurrentCell.X; 20341int oldEdgeRowIndex = _ptCurrentCell.Y; 20359SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20362success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20371if (_ptCurrentCell.X == -1) 20397if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, forCurrentCellChange: true)) 20402if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20409SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20411_ptCurrentCell.X, 20431if (_ptCurrentCell.X == -1) 20453if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20458if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20467success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20475if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20480if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20486SetSelectedRowCore(_ptCurrentCell.Y, false); 20488success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20498if (_ptCurrentCell.X == -1) 20518if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20523if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20531success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20543if (_ptCurrentCell.X == -1) 20569if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20574if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20603success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20612if (_ptCurrentCell.X == -1) 20638if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20643if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20651success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20667if (_ptCurrentCell.X == -1) 20689if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20695if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20701if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20708int oldEdgeColumnIndex = _ptCurrentCell.X; 20709int oldEdgeRowIndex = _ptCurrentCell.Y; 20719success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, false, false, false); 20727if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20732if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20738if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20740SetSelectedRowCore(_ptCurrentCell.Y, false); 20745SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20746SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20749success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20759if (_ptCurrentCell.X == -1) 20779if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20784if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20790if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20798SetSelectedCellCore(_ptCurrentCell.X, lastVisibleRowIndex, true); 20801success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 20813if (_ptCurrentCell.X == -1) 20839if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20844if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20850if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20879int oldEdgeColumnIndex = _ptCurrentCell.X; 20880int oldEdgeRowIndex = _ptCurrentCell.Y; 20898SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20902success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, !MultiSelect, false, false); 20911if (_ptCurrentCell.X == -1) 20937if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 20942if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20948if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20956SetSelectedCellCore(_ptCurrentCell.X, nextVisibleRowIndex, true); 20959success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 20973if (_ptCurrentCell.X == -1) 20993if (!ScrollIntoView(_ptCurrentCell.X, lastVisibleRowIndex, true)) 20998if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 21004success = SetCurrentCellAddressCore(_ptCurrentCell.X, lastVisibleRowIndex, true, false, false); 21013if (_ptCurrentCell.X == -1) 21039if (!ScrollIntoView(_ptCurrentCell.X, nextVisibleRowIndex, true)) 21044if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21050success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextVisibleRowIndex, true, false, false); 21108int oldEdgeColumnIndex = _ptCurrentCell.X; 21109int oldEdgeRowIndex = _ptCurrentCell.Y; 21157if (_ptCurrentCell.Y > -1 21158&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21161SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21165int oldEdgeColumnIndex = _ptCurrentCell.X; 21166int oldEdgeRowIndex = _ptCurrentCell.Y; 21178if (_ptCurrentCell.Y > -1 21179&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21195if (_ptCurrentCell.Y > -1 21196&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21233if (MultiSelect && _ptCurrentCell.X >= 0) 21272if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21289if (MultiSelect && _ptCurrentCell.X >= 0) 21291int oldEdgeColumnIndex = _ptCurrentCell.X; 21292int oldEdgeRowIndex = _ptCurrentCell.Y; 21327if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21364if (MultiSelect && _ptCurrentCell.Y >= 0) 21419if (_ptCurrentCell.X != -1) 21458int columnIndex = _ptCurrentCell.X; 21459int rowIndex = _ptCurrentCell.Y; 21501if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ModifierKeys == 0) 21503Debug.Assert(_ptCurrentCell.Y != -1); 21506|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21507|| !ColumnEditable(_ptCurrentCell.X)); 21509if (ColumnEditable(_ptCurrentCell.X) 21510&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21513bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21530if (_ptCurrentCell.X != -1) 21532DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 21582int oldEdgeColumnIndex = _ptCurrentCell.X; 21583int oldEdgeRowIndex = _ptCurrentCell.Y; 21631if (_ptCurrentCell.Y > -1 21632&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21639int oldEdgeColumnIndex = _ptCurrentCell.X; 21640int oldEdgeRowIndex = _ptCurrentCell.Y; 21652if (_ptCurrentCell.Y > -1 21653&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21669if (_ptCurrentCell.Y > -1 21670&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21707if (MultiSelect && _ptCurrentCell.X >= 0) 21751if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21768if (MultiSelect && _ptCurrentCell.X >= 0) 21770int oldEdgeColumnIndex = _ptCurrentCell.X; 21771int oldEdgeRowIndex = _ptCurrentCell.Y; 21806if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21878if (_ptCurrentCell.X != -1) 21884&& ColumnEditable(_ptCurrentCell.X) 21885&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21902bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22005if ((keyData & Keys.Alt) == Keys.Alt && AllowUserToResizeColumns && _ptCurrentCell.X != -1) 22009DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22014BeginKeyboardColumnResize(_ptCurrentCell.X); 22041if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22083if (_ptCurrentCell.X != -1) 22085dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 22109if (_ptCurrentCell.X == -1) 22130if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22135if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22143int oldEdgeColumnIndex = _ptCurrentCell.X; 22144int oldEdgeRowIndex = _ptCurrentCell.Y; 22161SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22164success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22170if (_ptCurrentCell.X == -1) 22191if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22196if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22202SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22203success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22220if (_ptCurrentCell.X == -1) 22241if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22246if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22273success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22279if (_ptCurrentCell.X == -1) 22300if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22305if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22312success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22329if (_ptCurrentCell.X == -1) 22350if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22355if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22360if (Columns[_ptCurrentCell.X].Selected) 22386int oldEdgeColumnIndex = _ptCurrentCell.X; 22387int oldEdgeRowIndex = _ptCurrentCell.Y; 22404SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22408success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22414if (_ptCurrentCell.X == -1) 22435if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22440if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22445if (Columns[_ptCurrentCell.X].Selected) 22453SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22456success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22471if (_ptCurrentCell.X == -1) 22492if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22497if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22502success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22533if (_ptCurrentCell.X == -1) 22551if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22557int oldEdgeColumnIndex = _ptCurrentCell.X; 22558int oldEdgeRowIndex = _ptCurrentCell.Y; 22559if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22573_ptCurrentCell.Y, 22581if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22586if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22592SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22595_ptCurrentCell.Y, 22605if (_ptCurrentCell.X == -1) 22626if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22631if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22637SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22640_ptCurrentCell.Y, 22653if (_ptCurrentCell.X == -1) 22676if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22681if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22689success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22694if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22699if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22704SetSelectedColumnCore(_ptCurrentCell.X, false); 22706success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22713if (_ptCurrentCell.X == -1) 22729if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22734if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22741success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22751if (_ptCurrentCell.X == -1) 22769if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22774if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22780if (Columns[_ptCurrentCell.X].Selected) 22787int oldEdgeColumnIndex = _ptCurrentCell.X; 22788int oldEdgeRowIndex = _ptCurrentCell.Y; 22798success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22803if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22808if (_ptCurrentCell.X == -1 || IsInnerCellOutOfBounds(firstVisibleColumnIndex, firstVisibleRowIndex)) 22813if (Columns[_ptCurrentCell.X].Selected) 22815SetSelectedColumnCore(_ptCurrentCell.X, false); 22820SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22821SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22824success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22831if (_ptCurrentCell.X == -1) 22847if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22852if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22857if (Columns[_ptCurrentCell.X].Selected) 22865SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22868success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22876if (_ptCurrentCell.X == -1) 22892if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22897if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22902success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22931if (_ptCurrentCell.Y == -1) 22941nextScreenVisibleRowIndex = _ptCurrentCell.Y; 22950if (!ScrollIntoView(_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 22957_ptCurrentCell.Y, 22988if (_ptCurrentCell.X == -1) 23021if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23026if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23034int oldEdgeColumnIndex = _ptCurrentCell.X; 23035int oldEdgeRowIndex = _ptCurrentCell.Y; 23052SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23055success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23060if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23065if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23093success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, false, false, false); 23097if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23102if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23115if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23129int oldEdgeColumnIndex = _ptCurrentCell.X; 23130int oldEdgeRowIndex = _ptCurrentCell.Y; 23142if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23150SetSelectedCellCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true); 23154success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, !MultiSelect, false, false); 23158if (!ScrollIntoView(_ptCurrentCell.X, nextScreenVisibleRowIndex, true)) 23163if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex)) 23168success = SetCurrentCellAddressCore(_ptCurrentCell.X, nextScreenVisibleRowIndex, true, false, false); 23192if (_ptCurrentCell.Y == -1) 23202previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23232_ptCurrentCell.X == -1 ? firstVisibleColumnIndex : _ptCurrentCell.X, 23248if (_ptCurrentCell.X == -1) 23280if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23285if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23293int oldEdgeColumnIndex = _ptCurrentCell.X; 23294int oldEdgeRowIndex = _ptCurrentCell.Y; 23311SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23314SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23318if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23323if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23351SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, false, false, false); 23355if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23360if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23373if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23387int oldEdgeColumnIndex = _ptCurrentCell.X; 23388int oldEdgeRowIndex = _ptCurrentCell.Y; 23400if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23408SetSelectedCellCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true); 23412SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, !MultiSelect, false, false); 23416if (!ScrollIntoView(_ptCurrentCell.X, previousScreenVisibleRowIndex, true)) 23421if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex)) 23426SetCurrentCellAddressCore(_ptCurrentCell.X, previousScreenVisibleRowIndex, true, false, false); 23462if (_ptCurrentCell.X != -1) 23464dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 23488if (_ptCurrentCell.X == -1) 23509if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23514if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23521int oldEdgeColumnIndex = _ptCurrentCell.X; 23522int oldEdgeRowIndex = _ptCurrentCell.Y; 23539SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23542success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23548if (_ptCurrentCell.X == -1) 23569if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23574if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23580SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23581success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23598if (_ptCurrentCell.X == -1) 23619if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23624if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23651success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23657if (_ptCurrentCell.X == -1) 23678if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23683if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23690success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23707if (_ptCurrentCell.X == -1) 23728if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23733if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23738if (Columns[_ptCurrentCell.X].Selected) 23771int oldEdgeColumnIndex = _ptCurrentCell.X; 23772int oldEdgeRowIndex = _ptCurrentCell.Y; 23784SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23788success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23794if (_ptCurrentCell.X == -1) 23815if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23820if (_ptCurrentCell.X == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23825if (Columns[_ptCurrentCell.X].Selected) 23833SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23836success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23851if (_ptCurrentCell.X == -1) 23872if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23877if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23882success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23913if (_ptCurrentCell.X == -1) 23929if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23934if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23947int oldEdgeColumnIndex = _ptCurrentCell.X; 23948int oldEdgeRowIndex = _ptCurrentCell.Y; 23956success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23962SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23963success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23970if (_ptCurrentCell.X == -1) 23986if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23991if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23997SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23998success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24008if (_ptCurrentCell.X == -1) 24024if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24029if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24044success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24049SetSelectedColumnCore(_ptCurrentCell.X, false); 24051success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24058if (_ptCurrentCell.X == -1) 24074if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24079if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24086success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24096if (_ptCurrentCell.X == -1) 24112if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24117if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24130if (Columns[_ptCurrentCell.X].Selected) 24137int oldEdgeColumnIndex = _ptCurrentCell.X; 24138int oldEdgeRowIndex = _ptCurrentCell.Y; 24148success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24153if (Columns[_ptCurrentCell.X].Selected) 24155SetSelectedColumnCore(_ptCurrentCell.X, false); 24160SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24161SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24164success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24171if (_ptCurrentCell.X == -1) 24187if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24192if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24197if (Columns[_ptCurrentCell.X].Selected) 24205SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24208success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24216if (_ptCurrentCell.X == -1) 24232if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24237if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24242success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24259if ((keyData & (Keys.Control | Keys.Shift | Keys.Alt)) == Keys.Shift && _ptCurrentCell.X != -1) 24278if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.X) 24290if (!Columns[_ptCurrentCell.X].Selected) 24292Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.X)); 24293SetSelectedColumnCore(_ptCurrentCell.X, true); 24305if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24317if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24319Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24320SetSelectedRowCore(_ptCurrentCell.Y, true); 24542if (_ptCurrentCell.Y != -1) 24544previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24558if (_ptCurrentCell.X == -1) 24574if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24579if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24585int oldEdgeColumnIndex = _ptCurrentCell.X; 24586int oldEdgeRowIndex = _ptCurrentCell.Y; 24594SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24598if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24603if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24609SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24610SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24616if (_ptCurrentCell.X == -1) 24630if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24635if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24641SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 24642SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24650if (_ptCurrentCell.X == -1) 24669if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24674if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24687int oldEdgeColumnIndex = _ptCurrentCell.X; 24688int oldEdgeRowIndex = _ptCurrentCell.Y; 24700SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 24703SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24708if (_ptCurrentCell.X == -1) 24727if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24732if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24738SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, selected: true); 24740_ptCurrentCell.X, 24756if (_ptCurrentCell.X == -1) 24772if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24777if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24785SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24789if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24794if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24799SetSelectedRowCore(_ptCurrentCell.Y, false); 24801SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24807if (_ptCurrentCell.X == -1) 24821if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24826if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24833SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 24841if (_ptCurrentCell.X == -1) 24860if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24865if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24892SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 24897if (_ptCurrentCell.X == -1) 24916if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 24921if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 24928SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 24940if (_ptCurrentCell.X == -1) 24956if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24961if (_ptAnchorCell.X == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24967if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24974int oldEdgeColumnIndex = _ptCurrentCell.X; 24975int oldEdgeRowIndex = _ptCurrentCell.Y; 24985SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, false, false, false); 24989if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 24994if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 24999if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25001SetSelectedRowCore(_ptCurrentCell.Y, false); 25006SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25007SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25010SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25016if (_ptCurrentCell.X == -1) 25030if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, true)) 25035if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25040if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25048SetSelectedCellCore(_ptCurrentCell.X, firstVisibleRowIndex, true); 25051SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25059if (_ptCurrentCell.X == -1) 25078if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25083if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25088if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25114int oldEdgeColumnIndex = _ptCurrentCell.X; 25115int oldEdgeRowIndex = _ptCurrentCell.Y; 25132SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25136SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, !MultiSelect, false, false); 25141if (_ptCurrentCell.X == -1) 25160if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25165if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25170if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25178SetSelectedCellCore(_ptCurrentCell.X, previousVisibleRowIndex, true); 25181SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25191if (_ptCurrentCell.X == -1) 25210if (!ScrollIntoView(_ptCurrentCell.X, firstVisibleRowIndex, forCurrentCellChange: true)) 25215if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex)) 25220SetCurrentCellAddressCore(_ptCurrentCell.X, firstVisibleRowIndex, true, false, false); 25225if (_ptCurrentCell.X == -1) 25244if (!ScrollIntoView(_ptCurrentCell.X, previousVisibleRowIndex, true)) 25249if (_ptCurrentCell.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex)) 25254SetCurrentCellAddressCore(_ptCurrentCell.X, previousVisibleRowIndex, true, false, false); 25271if (_ptCurrentCell.X != -1 && !IsCurrentCellInEditMode && ColumnEditable(_ptCurrentCell.X)) 25276if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25280bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25293object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25311InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25352_ptCurrentCell.Y, 25353_ptCurrentCell.X, 25366dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25369return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25391dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25394return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25473if (_ptCurrentCell.X != -1 && IsCurrentCellInEditMode) 25475Debug.Assert(_ptCurrentCell.Y != -1); 25477DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26012if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26014forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26015forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26030if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26032forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26033forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26044if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26046forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26047forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26211if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26272if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26274forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26275forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26301if (!committed && _ptCurrentCell.X >= 0 && !CommitEdit( 26303forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26304forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26353if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26786if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26791_ptCurrentCell.X = columnIndex; 26792_ptCurrentCell.Y = rowIndex; 26806int oldCurrentCellX = _ptCurrentCell.X; 26807int oldCurrentCellY = _ptCurrentCell.Y; 26852Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 26853Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 26925_ptCurrentCell.X = columnIndex; 26926_ptCurrentCell.Y = rowIndex; 26947OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26956if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 26962InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26963if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 26965InvalidateCellPrivate(-1, _ptCurrentCell.Y); 26969&& _ptCurrentCell.X != -1 26987if (_ptCurrentCell.X != -1) 26989AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27016int oldCurrentCellX = _ptCurrentCell.X; 27017int oldCurrentCellY = _ptCurrentCell.Y; 27058Debug.Assert(oldCurrentCellX == _ptCurrentCell.X); 27059Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 27083if (_ptCurrentCell.X != -1) 27085_ptCurrentCell.X = -1; 27086_ptCurrentCell.Y = -1; 28223_ptCurrentCellCache.X = _ptCurrentCell.X; 28224_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28499if (_ptCurrentCell.X != -1) 28501dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 28511if (_ptCurrentCell.Y != -1) 28513nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28521if (_ptCurrentCell.X == -1) 28534targetRowIndex = _ptCurrentCell.Y; 28549if (_ptCurrentCell.X == -1) 28572if (_ptCurrentCell.X == -1) 28595if (_ptCurrentCell.X == -1) 28606if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28626if (_ptCurrentCell.X == -1) 28660if (_ptCurrentCell.X != -1) 28662dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 28672if (_ptCurrentCell.Y != -1) 28674previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28690if (_ptCurrentCell.X == -1) 28703targetRowIndex = _ptCurrentCell.Y; 28718if (_ptCurrentCell.X == -1) 28741if (_ptCurrentCell.X == -1) 28764if (_ptCurrentCell.X == -1) 28775if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28795if (_ptCurrentCell.X == -1) 29101PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false);