1 write to ptCurrentCell
System.Windows.Forms (1)
winforms\Managed\System\WinForms\DataGridView.cs (1)
517
this.
ptCurrentCell
= new Point(-1, -1);
945 references to ptCurrentCell
System.Windows.Forms (945)
winforms\Managed\System\WinForms\DataGridView.cs (49)
1480
if (this.
ptCurrentCell
.X != -1 /*&& !this.IsCurrentCellInEditMode*/ && ColumnEditable(this.
ptCurrentCell
.X))
1485
if (!IsSharedCellReadOnly(dataGridViewCell, this.
ptCurrentCell
.Y))
2180
if (this.
ptCurrentCell
.X == -1 && this.
ptCurrentCell
.Y == -1)
2184
Debug.Assert(this.
ptCurrentCell
.X >= 0 &&
ptCurrentCell
.Y >= 0);
2185
Debug.Assert(this.
ptCurrentCell
.X < this.Columns.Count);
2186
Debug.Assert(this.
ptCurrentCell
.Y < this.Rows.Count);
2187
DataGridViewRow dataGridViewRow = (DataGridViewRow) this.Rows[this.
ptCurrentCell
.Y]; // unsharing row
2188
return dataGridViewRow.Cells[this.
ptCurrentCell
.X];
2192
if ((value != null && (value.RowIndex != this.
ptCurrentCell
.Y || value.ColumnIndex != this.
ptCurrentCell
.X)) ||
2193
(value == null && this.
ptCurrentCell
.X != -1))
2241
return this.
ptCurrentCell
;
2249
Debug.Assert(this.
ptCurrentCell
.X >= 0 && this.
ptCurrentCell
.X < this.Columns.Count);
2250
Debug.Assert(this.
ptCurrentCell
.Y >= 0 && this.
ptCurrentCell
.Y < this.Rows.Count);
2251
DataGridViewRow dataGridViewRow = this.Rows.SharedRow(this.
ptCurrentCell
.Y);
2253
DataGridViewCell dataGridViewCell = dataGridViewRow.Cells[this.
ptCurrentCell
.X];
2254
Debug.Assert(this.IsSharedCellVisible(dataGridViewCell, this.
ptCurrentCell
.Y));
2263
if (this.
ptCurrentCell
.X == -1)
2267
Debug.Assert(this.
ptCurrentCell
.Y != -1);
2269
bool previousVisibleColumnExists = (null != this.Columns.GetPreviousColumn(this.Columns[this.
ptCurrentCell
.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None));
2270
bool previousVisibleRowExists = (-1 != this.Rows.GetPreviousRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible));
2280
if (this.
ptCurrentCell
.X == -1)
2285
Debug.Assert(this.
ptCurrentCell
.Y != -1);
2287
bool nextVisibleColumnExists = (null != this.Columns.GetNextColumn(this.Columns[this.
ptCurrentCell
.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None));
2288
bool nextVisibleRowExists = (-1 != this.Rows.GetNextRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible));
2298
if (this.
ptCurrentCell
.X == -1)
2303
Debug.Assert(this.
ptCurrentCell
.Y != -1);
2319
if (this.
ptCurrentCell
.X == -1)
2324
Debug.Assert(this.
ptCurrentCell
.Y >= 0);
2325
Debug.Assert(this.
ptCurrentCell
.Y < this.Rows.Count);
2327
return this.Rows[this.
ptCurrentCell
.Y];
3130
if (this.
ptCurrentCell
.X >= 0 &&
3206
if (this.
ptCurrentCell
.X >= 0 &&
3445
!this.Columns[this.
ptCurrentCell
.X].Frozen &&
3582
if (this.
ptCurrentCell
.X == -1)
3587
return this.CurrentCellInternal.GetInheritedStyleInternal(this.
ptCurrentCell
.Y);
3666
if (this.RowHeadersVisible && this.ShowEditingIcon && this.
ptCurrentCell
.Y >= 0)
3669
InvalidateCellPrivate(-1, this.
ptCurrentCell
.Y);
3921
this.
ptCurrentCell
.X != -1 &&
4001
if (this.
ptCurrentCell
.X != -1 &&
4900
Debug.Assert(this.
ptCurrentCell
.Y >= 0);
4901
InvalidateCellPrivate(-1, this.
ptCurrentCell
.Y);
4907
Debug.Assert(this.
ptCurrentCell
.Y >= 0);
4908
InvalidateCellPrivate(-1, this.
ptCurrentCell
.Y);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (896)
2593
if (this.
ptCurrentCell
.X == -1)
2615
Debug.Assert(this.
ptCurrentCell
.X >= 0 && this.
ptCurrentCell
.X < this.Columns.Count);
2616
Debug.Assert(this.
ptCurrentCell
.Y >= 0 && this.
ptCurrentCell
.Y < this.Rows.Count);
2622
if (IsSharedCellReadOnly(dataGridViewCell, this.
ptCurrentCell
.Y) ||
2623
!ColumnEditable(this.
ptCurrentCell
.X))
2639
DataGridViewCellCancelEventArgs dgvcce = new DataGridViewCellCancelEventArgs(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
2647
if (this.
ptCurrentCell
.X > -1)
2655
if (IsSharedCellReadOnly(dataGridViewCell, this.
ptCurrentCell
.Y) ||
2656
!ColumnEditable(this.
ptCurrentCell
.X))
2678
DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(null, this.
ptCurrentCell
.Y, true);
2722
((IDataGridViewEditingControl)this.editingControl).EditingControlRowIndex = this.
ptCurrentCell
.Y;
2741
if (this.toolTipControl.Activated && this.ptToolTipCell == this.
ptCurrentCell
)
2758
InvalidateCellPrivate(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
3071
if (this.
ptCurrentCell
.X != -1)
3073
Debug.Assert(this.
ptCurrentCell
.Y != -1);
3075
int oldCurrentCellX = this.
ptCurrentCell
.X;
3134
dgvdee2 = new DataGridViewDataErrorEventArgs(exception, this.
ptCurrentCell
.X,
3135
this.
ptCurrentCell
.Y,
3159
InvalidateCellPrivate(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
3163
else if (this.
ptCurrentCell
.X == -1 && this.Focused)
3245
int oldCurrentCellX = this.
ptCurrentCell
.X;
3250
if (currentCellDirty || this.
ptCurrentCell
.Y == -1 || this.
ptCurrentCell
.X == -1)
3276
if (this.
ptCurrentCell
.Y > -1)
3278
InvalidateRowPrivate(this.
ptCurrentCell
.Y);
3282
DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(null, this.
ptCurrentCell
.Y, true);
3298
if (discardNewRow && this.
ptCurrentCell
.Y == this.newRowIndex - 1)
3307
this.
ptCurrentCell
.Y == this.newRowIndex - 1 &&
3347
if (this.
ptCurrentCell
.X > -1)
3396
if (this.dataConnection.CurrencyManager.Count <= this.
ptCurrentCell
.Y)
3466
if (this.
ptCurrentCell
.X != -1 &&
3470
InvalidateCellPrivate(this.
ptCurrentCell
.X, -1);
3800
Debug.Assert(this.
ptCurrentCell
.X > -1);
3803
if (this.
ptCurrentCell
.X == -1)
3807
OnCellLeave(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
3811
if (this.
ptCurrentCell
.X == -1)
3815
OnRowLeave(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
3825
if (this.
ptCurrentCell
.X > -1 && this.
ptCurrentCell
.Y > -1)
3827
InvalidateCellPrivate(this.
ptCurrentCell
.X /*columnIndex*/, this.
ptCurrentCell
.Y /*rowIndex*/);
3834
if (this.
ptCurrentCell
.X == -1)
3838
if (OnCellValidating(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, context))
3842
if (this.
ptCurrentCell
.X == -1)
3846
OnRowEnter(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, true /*canCreateNewRow*/, true /*validationFailureOccurred*/);
3850
if (this.
ptCurrentCell
.X == -1)
3854
OnCellEnter(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
3856
if (this.
ptCurrentCell
.X == -1)
3861
this.
ptCurrentCell
.X,
3862
this.
ptCurrentCell
.Y,
3872
if (this.
ptCurrentCell
.X == -1)
3876
OnCellValidated(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
3881
if (this.
ptCurrentCell
.X == -1 || !this.IsCurrentCellInEditMode)
3900
Debug.Assert(this.
ptCurrentCell
.X > -1);
3901
if (this.
ptCurrentCell
.X == -1)
3905
if (OnCellValidating(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, context))
3907
if (this.
ptCurrentCell
.X == -1)
3912
this.
ptCurrentCell
.X,
3913
this.
ptCurrentCell
.Y,
3935
if (this.
ptCurrentCell
.X == -1)
3940
this.
ptCurrentCell
.X,
3941
this.
ptCurrentCell
.Y,
3973
if (this.
ptCurrentCell
.X == -1)
3977
OnCellValidated(ref dataGridViewCurrentCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
4031
Debug.Assert(this.
ptCurrentCell
.X > -1);
4032
if (this.
ptCurrentCell
.X == -1)
4036
int columnIndex = this.
ptCurrentCell
.X;
4037
int rowIndex = this.
ptCurrentCell
.Y;
4070
this.
ptCurrentCell
.Y != rowIndex /*fireRowLeave*/,
4071
this.
ptCurrentCell
.Y != rowIndex /*fireRowEnter*/,
4079
if (this.
ptCurrentCell
.Y != rowIndex && this.
ptCurrentCell
.Y != -1)
4082
int columnIndexTmp = this.
ptCurrentCell
.X;
4083
int rowIndexTmp = this.
ptCurrentCell
.Y;
4123
this.
ptCurrentCell
.Y != rowIndex /*forCurrentRowChange*/))
4143
this.
ptCurrentCell
.X == -1 &&
5488
Debug.Assert(this.
ptCurrentCell
.Y == this.newRowIndex);
5799
Debug.Assert(this.
ptCurrentCell
.X != -1);
5985
Debug.Assert(this.
ptCurrentCell
.X != -1);
5996
Debug.Assert(this.
ptCurrentCell
.X != -1);
6207
if (this.
ptCurrentCell
.X == -1)
6215
int curRowIndex = this.
ptCurrentCell
.Y;
6216
int curColIndex = this.
ptCurrentCell
.X;
6249
if (curRowIndex != this.
ptCurrentCell
.Y || curColIndex != this.
ptCurrentCell
.X)
6273
InvalidateCellPrivate(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
6294
InvalidateCellPrivate(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
8890
(this.
ptCurrentCell
.Y != -1 && (this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Frozen) == 0)
8950
(this.
ptCurrentCell
.X != -1 && !this.Columns[this.
ptCurrentCell
.X].Frozen)
9842
this.uneditedFormattedValue = dataGridViewCell.GetFormattedValue(this.
ptCurrentCell
.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting);
9853
Debug.Assert(this.
ptCurrentCell
.X == dataGridViewCell.ColumnIndex);
9854
dataGridViewCell = this.Rows[this.
ptCurrentCell
.Y].Cells[this.
ptCurrentCell
.X]; // unshare the edited cell
9866
dgvdee = new DataGridViewDataErrorEventArgs(exception, this.
ptCurrentCell
.X,
9867
this.
ptCurrentCell
.Y,
9893
object initialFormattedValue = dataGridViewCell.GetFormattedValue(this.
ptCurrentCell
.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting);
9898
dataGridViewCell.InitializeEditingControl(this.
ptCurrentCell
.Y, initialFormattedValue, dataGridViewCellStyle);
9907
dgvdee = new DataGridViewDataErrorEventArgs(exception, this.
ptCurrentCell
.X,
9908
this.
ptCurrentCell
.Y,
10284
this.
ptCurrentCell
.X != -1)
10693
Debug.Assert(this.
ptCurrentCell
.X >= 0 && this.
ptCurrentCell
.X < this.Columns.Count);
10694
Debug.Assert(this.
ptCurrentCell
.Y >= 0 && this.
ptCurrentCell
.Y < this.Rows.Count);
12424
if (this.
ptCurrentCell
.X == -1)
12440
if (this.
ptCurrentCell
.X >= 0 &&
12441
(this.
ptCurrentCell
.X != hti.col || this.
ptCurrentCell
.Y != hti.row))
12443
Point ptOriginalCurrentCell = this.
ptCurrentCell
;
12445
this.
ptCurrentCell
.X != hti.col || this.
ptCurrentCell
.Y != hti.row /*forCurrentCellChange*/,
12446
this.
ptCurrentCell
.Y != hti.row /*forCurrentRowChange*/))
12451
if (this.
ptCurrentCell
!= ptOriginalCurrentCell)
12463
if (this.
ptCurrentCell
.X == -1 && dataGridViewLastVisibleColumn != null)
12478
if (this.
ptCurrentCell
.X == -1 && lastVisibleRowIndex != -1)
12521
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
12522
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
12686
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
12687
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
12866
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
12867
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
13134
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
13135
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
13136
if ((hti.col != this.
ptCurrentCell
.X || hti.row != this.
ptCurrentCell
.Y) &&
13151
if (hti.col != this.
ptCurrentCell
.X || hti.row != this.
ptCurrentCell
.Y)
13185
this.
ptCurrentCell
.X == dataGridViewCell.ColumnIndex &&
13186
this.
ptCurrentCell
.Y == dataGridViewCell.RowIndex &&
13193
ColumnEditable(this.
ptCurrentCell
.X) &&
14178
if (rowIndex > -1 && hti.col != this.
ptCurrentCell
.X)
14181
int oldCurrentCellX = this.
ptCurrentCell
.X;
14182
int oldCurrentCellY = this.
ptCurrentCell
.Y;
14187
rowIndex != this.
ptCurrentCell
.Y /*fireRowLeave*/,
14188
rowIndex != this.
ptCurrentCell
.Y /*fireRowEnter*/,
14304
if (hti.col != this.
ptCurrentCell
.X)
14319
else if (-1 != this.
ptCurrentCell
.X)
14322
bool success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false /*setAnchorCellAddress*/, false /*validateCurrentCell*/, false /*throughMouseClick*/);
14599
if (this.
ptCurrentCell
.X != -1 &&
14600
hti.col != this.
ptCurrentCell
.X &&
14601
!CommitEditForOperation(hti.col, this.
ptCurrentCell
.Y, true))
14682
if (this.
ptCurrentCell
.X != -1 && hti.col != this.
ptCurrentCell
.X)
14684
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(hti.col))
14689
this.
ptCurrentCell
.Y,
14899
dataGridViewColumn.Index == this.
ptCurrentCell
.X &&
14905
ColumnEditable(this.
ptCurrentCell
.X) &&
14906
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.ReadOnly) == 0 &&
14980
PositionEditingControl(this.
ptCurrentCell
.X != e.Column.Index, true, false);
15010
(columnIndex == this.
ptCurrentCell
.X && rowIndex == this.
ptCurrentCell
.Y))))
15041
Debug.Assert(this.
ptCurrentCell
.Y >= 0);
15042
InvalidateCellPrivate(-1, this.
ptCurrentCell
.Y);
15044
if (this.IsCurrentCellDirty && this.newRowIndex == this.
ptCurrentCell
.Y)
15209
else if (dataGridViewColumn.Visible && this.
ptCurrentCell
.X == dataGridViewColumn.Index)
15228
if (this.
ptCurrentCell
.X == dataGridViewColumn.Index &&
15267
if (elementState == DataGridViewElementStates.Visible && this.
ptCurrentCell
.Y == rowIndex)
15275
Debug.Assert(this.dataConnection.CurrencyManager.Position == this.
ptCurrentCell
.Y);
15287
if (this.
ptCurrentCell
.Y == rowIndex &&
15324
if (this.
ptCurrentCell
.X == dataGridViewCell.ColumnIndex &&
15325
this.
ptCurrentCell
.Y == dataGridViewCell.RowIndex &&
15469
this.
ptCurrentCell
.X > -1 &&
15528
if (this.
ptCurrentCell
.X > -1)
15533
OnRowEnter(ref dataGridViewCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false /*canCreateNewRow*/, false /*validationFailureOccurred*/);
15534
if (this.
ptCurrentCell
.X == -1)
15538
OnCellEnter(ref dataGridViewCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
15543
InvalidateCellPrivate(this.
ptCurrentCell
.X, -1);
15552
if (this.
ptCurrentCell
.X > -1 &&
15559
if (this.
ptCurrentCell
.X > -1 && this.CurrentCellInternal.EditType == null && !this.dataGridViewOper[DATAGRIDVIEWOPER_inMouseDown])
15564
InvalidateCellPrivate(this.
ptCurrentCell
.X /*columnIndex*/, this.
ptCurrentCell
.Y /*rowIndex*/);
15573
InvalidateCellPrivate(this.
ptCurrentCell
.X /*columnIndex*/, this.
ptCurrentCell
.Y /*rowIndex*/);
15691
if (this.
ptCurrentCell
.X != -1)
15693
InvalidateCell(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
15700
this.
ptCurrentCell
.X > -1)
15705
AccessibilityNotifyCurrentCellChanged(this.
ptCurrentCell
);
15730
if (this.
ptCurrentCell
.X == -1)
15736
ScrollIntoView(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false /*forCurrentCellChange*/);
15772
Debug.Assert(this.
ptCurrentCell
.X == -1);
15809
Debug.Assert(this.
ptCurrentCell
.X == -1);
15848
Debug.Assert(this.
ptCurrentCell
.X == -1);
15894
if (this.
ptCurrentCell
.X != -1)
15896
newCurrentCell = new Point(columnIndexInserted <= this.
ptCurrentCell
.X ? this.
ptCurrentCell
.X + 1 : this.
ptCurrentCell
.X,
15897
this.
ptCurrentCell
.Y);
16006
if (this.
ptCurrentCell
.Y != -1 && rowIndexInserted <= this.
ptCurrentCell
.Y)
16008
newCurrentCell = new Point(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y + insertionCount);
16080
if (this.
ptCurrentCell
.Y != -1 && rowIndexInserted <= this.
ptCurrentCell
.Y)
16082
newCurrentCell = new Point(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y + dataGridViewRows.Length);
16142
if (this.
ptCurrentCell
.X != -1)
16146
if (dataGridViewCell.KeyDownUnsharesRowInternal(e, this.
ptCurrentCell
.Y))
16148
DataGridViewRow dataGridViewRow = this.Rows[this.
ptCurrentCell
.Y];
16149
this.CurrentCellInternal.OnKeyDownInternal(e, this.
ptCurrentCell
.Y);
16153
dataGridViewCell.OnKeyDownInternal(e, this.
ptCurrentCell
.Y);
16200
if (this.
ptCurrentCell
.X != -1)
16204
if (dataGridViewCell.KeyPressUnsharesRowInternal(e, this.
ptCurrentCell
.Y))
16206
DataGridViewRow dataGridViewRow = this.Rows[this.
ptCurrentCell
.Y];
16207
this.CurrentCellInternal.OnKeyPressInternal(e, this.
ptCurrentCell
.Y);
16211
dataGridViewCell.OnKeyPressInternal(e, this.
ptCurrentCell
.Y);
16234
if (this.
ptCurrentCell
.X != -1)
16238
if (dataGridViewCell.KeyUpUnsharesRowInternal(e, this.
ptCurrentCell
.Y))
16240
DataGridViewRow dataGridViewRow = this.Rows[this.
ptCurrentCell
.Y];
16241
this.CurrentCellInternal.OnKeyUpInternal(e, this.
ptCurrentCell
.Y);
16245
dataGridViewCell.OnKeyUpInternal(e, this.
ptCurrentCell
.Y);
16273
if (this.
ptCurrentCell
.X > -1 && !this.dataGridViewState1[DATAGRIDVIEWSTATE1_leavingWithTabKey])
16276
OnCellLeave(ref dataGridViewCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
16277
if (this.
ptCurrentCell
.X == -1)
16281
OnRowLeave(ref dataGridViewCell, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
16289
if (this.
ptCurrentCell
.X > -1 && this.
ptCurrentCell
.Y > -1)
16291
InvalidateCellPrivate(this.
ptCurrentCell
.X /*columnIndex*/, this.
ptCurrentCell
.Y /*rowIndex*/);
16306
if (this.
ptCurrentCell
.X != -1)
16308
InvalidateCell(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
16331
(this.ptMouseDownCell.X == this.
ptCurrentCell
.X &&
16332
this.ptMouseDownCell.Y == this.
ptCurrentCell
.Y)))
16949
if (this.
ptCurrentCell
.X >= 0 &&
16990
if (this.
ptCurrentCell
.X >= 0 &&
17312
this.
ptCurrentCell
.X != -1 &&
17313
ColumnEditable(this.
ptCurrentCell
.X) &&
17317
!this.Rows[this.
ptCurrentCell
.Y].Cells[this.
ptCurrentCell
.X].ReadOnly) // Unshares the row
17351
Debug.Assert(this.
ptCurrentCell
.X == -1);
17401
Debug.Assert(this.
ptCurrentCell
.X == -1);
17481
if (this.
ptCurrentCell
.X != -1)
17483
int newX = this.
ptCurrentCell
.X;
17484
if (columnIndex == this.
ptCurrentCell
.X)
17524
else if (columnIndex < this.
ptCurrentCell
.X)
17526
newX = this.
ptCurrentCell
.X - 1;
17528
newCurrentCell = new Point(newX, (newX == -1) ? -1 : this.
ptCurrentCell
.Y);
17529
if (columnIndex == this.
ptCurrentCell
.X)
17696
if (this.
ptCurrentCell
.Y != -1 && rowIndexDeleted <= this.
ptCurrentCell
.Y)
17699
if (rowIndexDeleted == this.
ptCurrentCell
.Y)
17733
Debug.Assert(rowIndexDeleted < this.
ptCurrentCell
.Y);
17734
newY = this.
ptCurrentCell
.Y - 1;
17736
newCurrentCell = new Point(this.
ptCurrentCell
.X, newY);
17737
if (rowIndexDeleted == this.
ptCurrentCell
.Y)
17843
if (this.
ptCurrentCell
.X == dataGridViewRow.Index &&
17844
this.
ptCurrentCell
.Y == columnIndex)
17848
this.ptCurrentCellCache.X = this.
ptCurrentCell
.X;
17849
this.ptCurrentCellCache.Y = this.
ptCurrentCell
.Y;
17981
this.
ptCurrentCell
.X == -1 && allowSettingCurrentCell && !this.InSortOperation)
18433
if (dataGridViewColumn != null && hti.row != this.
ptCurrentCell
.Y)
18435
int oldCurrentCellX = this.
ptCurrentCell
.X;
18436
int oldCurrentCellY = this.
ptCurrentCell
.Y;
18442
hti.row != this.
ptCurrentCell
.Y /*fireRowLeave*/,
18443
hti.row != this.
ptCurrentCell
.Y /*fireRowEnter*/,
18484
if (this.
ptCurrentCell
.X == -1 && lastVisibleRowIndex != -1)
18586
if (hti.row != this.
ptCurrentCell
.Y)
18602
else if (-1 != this.
ptCurrentCell
.Y)
18605
bool success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y,
18941
if (this.
ptCurrentCell
.Y != -1 &&
18942
hti.row != this.
ptCurrentCell
.Y &&
18943
!CommitEditForOperation(this.
ptCurrentCell
.X, hti.row, true))
19019
if (this.
ptCurrentCell
.Y != -1 && hti.row != this.
ptCurrentCell
.Y)
19025
bool success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X,
19213
rowIndex == this.
ptCurrentCell
.Y &&
19220
!this.Columns[this.
ptCurrentCell
.X].ReadOnly &&
19221
ColumnEditable(this.
ptCurrentCell
.X) &&
19234
if (-1 != this.
ptCurrentCell
.X && dataGridViewRow.Index == this.
ptCurrentCell
.Y && this.editingControl != null)
19534
if (-1 != this.
ptCurrentCell
.X)
19537
bool success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y,
19628
if (this.
ptCurrentCell
.X >= 0)
19631
if (OnRowValidating(ref dataGridViewCellTmp, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y))
19637
if (this.
ptCurrentCell
.X == -1)
19641
OnRowValidated(ref dataGridViewCellTmp, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
19644
this.
ptCurrentCell
.X >= 0 &&
19646
this.newRowIndex == this.
ptCurrentCell
.Y)
19649
int rowIndex = this.Rows.GetPreviousRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible);
19652
bool success = SetAndSelectCurrentCellAddress(this.
ptCurrentCell
.X, rowIndex,
20362
int leftEdge = GetColumnXFromIndex(this.
ptCurrentCell
.X);
20365
leftEdge -= this.Columns[this.
ptCurrentCell
.X].Width-1;
20367
Rectangle cellBounds = new Rectangle(leftEdge, GetRowYFromIndex(this.
ptCurrentCell
.Y),
20368
this.Columns[this.
ptCurrentCell
.X].Width, this.Rows.SharedRow(this.
ptCurrentCell
.Y).GetHeight(this.
ptCurrentCell
.Y));
20371
if (!this.Columns[this.
ptCurrentCell
.X].Frozen)
20380
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Frozen) == 0)
20400
bool isFirstDisplayedColumn = this.FirstDisplayedColumnIndex == this.
ptCurrentCell
.X;
20401
bool isFirstDisplayedRow = this.FirstDisplayedRowIndex == this.
ptCurrentCell
.Y;
20612
if (this.
ptCurrentCell
.X > -1 &&
20716
if (this.
ptCurrentCell
.Y != -1)
20718
nextVisibleRowIndex = this.Rows.GetNextRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible);
20733
if (this.
ptCurrentCell
.X == -1)
20759
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
20766
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
20767
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
20768
if (this.
ptCurrentCell
.X == -1 || this.ptAnchorCell.X == -1 ||
20776
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, false, false, false);
20784
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
20788
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
20795
SetSelectedCellCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true);
20796
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
20806
if (this.
ptCurrentCell
.X == -1)
20825
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
20829
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
20835
SetSelectedCellCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true);
20836
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
20848
if (this.
ptCurrentCell
.X == -1)
20872
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true))
20876
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
20884
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
20885
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
20897
SetSelectedCellCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true);
20899
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, !this.MultiSelect, false, false);
20908
if (this.
ptCurrentCell
.X == -1)
20932
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true /*forCurrentCellChange*/))
20936
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
20942
SetSelectedCellCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true);
20943
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X,
20962
if (this.
ptCurrentCell
.X == -1)
20983
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
20987
if (this.ptAnchorCell.Y == -1 || this.
ptCurrentCell
.X == -1 ||
20996
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, false, false, false);
21004
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
21008
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
21013
SetSelectedRowCore(this.
ptCurrentCell
.Y, false);
21015
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
21025
if (this.
ptCurrentCell
.X == -1)
21044
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
21048
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
21055
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
21067
if (this.
ptCurrentCell
.X == -1)
21091
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true))
21095
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
21121
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, !this.MultiSelect, false, false);
21130
if (this.
ptCurrentCell
.X == -1)
21154
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true))
21158
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
21165
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true, false, false);
21180
if (this.
ptCurrentCell
.X == -1)
21201
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
21206
if (this.ptAnchorCell.Y == -1 || this.
ptCurrentCell
.Y == -1 ||
21212
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21221
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
21222
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
21226
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, false, false, false);
21234
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
21238
if (this.
ptCurrentCell
.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
21243
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21245
SetSelectedRowCore(this.
ptCurrentCell
.Y, false);
21250
SetSelectedCellCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
21251
SetSelectedCellCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true);
21253
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
21263
if (this.
ptCurrentCell
.X == -1)
21282
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
21286
if (this.
ptCurrentCell
.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
21291
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21299
SetSelectedCellCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true);
21301
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
21313
if (this.
ptCurrentCell
.X == -1)
21337
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true))
21341
if (this.
ptCurrentCell
.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
21346
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21375
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
21376
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
21388
SetSelectedCellCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true);
21391
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, !this.MultiSelect, false, false);
21400
if (this.
ptCurrentCell
.X == -1)
21424
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true))
21428
if (this.
ptCurrentCell
.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
21433
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21441
SetSelectedCellCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true);
21443
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true, false, false);
21456
if (this.
ptCurrentCell
.X == -1)
21475
if (!ScrollIntoView(this.
ptCurrentCell
.X, lastVisibleRowIndex, true))
21479
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex))
21484
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, lastVisibleRowIndex, true, false, false);
21493
if (this.
ptCurrentCell
.X == -1)
21517
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextVisibleRowIndex, true))
21521
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextVisibleRowIndex))
21526
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextVisibleRowIndex, true, false, false);
21584
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
21585
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
21628
if (this.
ptCurrentCell
.Y > -1 &&
21629
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21632
SelectRowRange(this.
ptCurrentCell
.Y, lastVisibleRowIndex, true);
21636
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
21637
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
21644
if (this.
ptCurrentCell
.Y > -1 &&
21645
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21660
if (this.
ptCurrentCell
.Y > -1 &&
21661
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
21695
if (this.MultiSelect && this.
ptCurrentCell
.X >= 0)
21731
if (this.
ptCurrentCell
.X >= 0 && this.Columns[this.
ptCurrentCell
.X].Selected)
21746
if (this.MultiSelect && this.
ptCurrentCell
.X >= 0)
21748
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
21749
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
21776
if (this.
ptCurrentCell
.X >= 0 && this.Columns[this.
ptCurrentCell
.X].Selected)
21810
if (this.MultiSelect && this.
ptCurrentCell
.Y >= 0)
21867
if (this.
ptCurrentCell
.X != -1)
21903
int columnIndex = this.
ptCurrentCell
.X;
21904
int rowIndex = this.
ptCurrentCell
.Y;
21951
if (this.
ptCurrentCell
.X != -1 &&
21955
Debug.Assert(this.
ptCurrentCell
.Y != -1);
21958
(IsSharedCellReadOnly(this.CurrentCellInternal, this.
ptCurrentCell
.Y) || !ColumnEditable(this.
ptCurrentCell
.X)));
21959
if (ColumnEditable(this.
ptCurrentCell
.X) &&
21960
!IsSharedCellReadOnly(this.CurrentCellInternal, this.
ptCurrentCell
.Y) &&
21964
bool success = ScrollIntoView(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
21984
if (this.
ptCurrentCell
.X != -1 && AccessibilityImprovements.Level2)
21986
DataGridViewColumn dataGridViewColumn = Columns[this.
ptCurrentCell
.X];
22038
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
22039
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
22082
if (this.
ptCurrentCell
.Y > -1 &&
22083
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
22090
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
22091
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
22098
if (this.
ptCurrentCell
.Y > -1 &&
22099
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
22114
if (this.
ptCurrentCell
.Y > -1 &&
22115
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
22149
if (this.MultiSelect && this.
ptCurrentCell
.X >= 0)
22189
if (this.
ptCurrentCell
.X >= 0 && this.Columns[this.
ptCurrentCell
.X].Selected)
22204
if (this.MultiSelect && this.
ptCurrentCell
.X >= 0)
22206
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
22207
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
22234
if (this.
ptCurrentCell
.X >= 0 && this.Columns[this.
ptCurrentCell
.X].Selected)
22308
if (this.
ptCurrentCell
.X != -1)
22314
ColumnEditable(this.
ptCurrentCell
.X) &&
22315
!IsSharedCellReadOnly(dataGridViewCell, this.
ptCurrentCell
.Y) &&
22333
bool success = ScrollIntoView(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
22454
if (AccessibilityImprovements.Level2 && (keyData & Keys.Alt) == Keys.Alt && this.AllowUserToResizeColumns && this.
ptCurrentCell
.X != -1)
22458
DataGridViewColumn dataGridViewColumn = Columns[this.
ptCurrentCell
.X];
22462
BeginKeyboardColumnResize(this.
ptCurrentCell
.X);
22515
if (this.
ptCurrentCell
.X != -1)
22517
dataGridViewColumn = this.Columns.GetPreviousColumn(this.Columns[this.
ptCurrentCell
.X],
22541
if (this.
ptCurrentCell
.X == -1)
22560
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22564
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22572
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
22573
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
22584
SetSelectedCellCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
22586
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, !this.MultiSelect, false, false);
22592
if (this.
ptCurrentCell
.X == -1)
22611
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22615
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22620
SetSelectedCellCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
22621
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
22637
if (this.
ptCurrentCell
.X == -1)
22656
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22660
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22684
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, !this.MultiSelect, false, false);
22690
if (this.
ptCurrentCell
.X == -1)
22709
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22713
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22719
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
22735
if (this.
ptCurrentCell
.X == -1)
22754
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22758
if (this.
ptCurrentCell
.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22762
if (this.Columns[this.
ptCurrentCell
.X].Selected)
22787
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
22788
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
22799
SetSelectedCellCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
22802
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, !this.MultiSelect, false, false);
22808
if (this.
ptCurrentCell
.X == -1)
22827
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22831
if (this.
ptCurrentCell
.X == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22835
if (this.Columns[this.
ptCurrentCell
.X].Selected)
22843
SetSelectedCellCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
22845
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
22859
if (this.
ptCurrentCell
.X == -1)
22878
if (!ScrollIntoView(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22882
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex))
22886
success = SetCurrentCellAddressCore(previousVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
22915
if (this.
ptCurrentCell
.X == -1)
22932
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22939
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
22940
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
22941
if (this.ptAnchorCell.X == -1 || this.
ptCurrentCell
.X == -1 ||
22948
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, false, false, false);
22953
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22957
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex))
22963
SetSelectedCellCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
22964
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
22971
if (this.
ptCurrentCell
.X == -1)
22986
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
22990
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex))
22995
SetSelectedCellCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
22996
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23005
if (this.
ptCurrentCell
.X == -1)
23022
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23026
if (this.ptAnchorCell.X == -1 || this.
ptCurrentCell
.Y == -1 ||
23034
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, false, false, false);
23039
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23043
if (this.
ptCurrentCell
.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex))
23047
SetSelectedColumnCore(this.
ptCurrentCell
.X, false);
23049
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23056
if (this.
ptCurrentCell
.X == -1)
23071
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23075
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex))
23081
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23090
if (this.
ptCurrentCell
.X == -1)
23107
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23111
if (this.ptAnchorCell.X == -1 || this.
ptCurrentCell
.X == -1 ||
23117
if (this.Columns[this.
ptCurrentCell
.X].Selected)
23126
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
23127
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
23131
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, false, false, false);
23136
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23140
if (this.
ptCurrentCell
.X == -1 ||
23145
if (this.Columns[this.
ptCurrentCell
.X].Selected)
23147
SetSelectedColumnCore(this.
ptCurrentCell
.X, false);
23152
SetSelectedCellCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
23153
SetSelectedCellCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
23155
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23162
if (this.
ptCurrentCell
.X == -1)
23177
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23181
if (this.
ptCurrentCell
.X == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex))
23185
if (this.Columns[this.
ptCurrentCell
.X].Selected)
23193
SetSelectedCellCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
23195
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23202
if (this.
ptCurrentCell
.X == -1)
23217
if (!ScrollIntoView(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23221
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex))
23225
success = SetCurrentCellAddressCore(firstVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23252
if (this.
ptCurrentCell
.Y == -1)
23262
nextScreenVisibleRowIndex = this.
ptCurrentCell
.Y;
23271
if (!ScrollIntoView(this.
ptCurrentCell
.X == -1 ? firstVisibleColumnIndex : this.
ptCurrentCell
.X,
23277
this.
ptCurrentCell
.Y,
23306
if (this.
ptCurrentCell
.X == -1)
23341
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true))
23345
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex))
23352
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
23353
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
23364
SetSelectedCellCore(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true);
23366
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, false, false, false);
23371
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true))
23375
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex))
23400
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, false, false, false);
23405
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true))
23409
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex))
23420
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
23434
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
23435
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
23442
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
23450
SetSelectedCellCore(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true);
23453
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, !this.MultiSelect, false, false);
23458
if (!ScrollIntoView(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true))
23462
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(nextScreenVisibleRowIndex))
23466
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, nextScreenVisibleRowIndex, true, false, false);
23492
if (this.
ptCurrentCell
.Y == -1)
23502
previousScreenVisibleRowIndex = this.
ptCurrentCell
.Y;
23535
!ScrollIntoView(this.
ptCurrentCell
.X == -1 ? firstVisibleColumnIndex : this.
ptCurrentCell
.X,
23548
if (this.
ptCurrentCell
.X == -1)
23580
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true))
23584
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex))
23591
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
23592
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
23603
SetSelectedCellCore(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true);
23605
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, false, false, false);
23610
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true))
23614
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex))
23639
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, false, false, false);
23644
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true))
23648
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex))
23659
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
23673
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
23674
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
23681
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
23689
SetSelectedCellCore(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true);
23692
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, !this.MultiSelect, false, false);
23697
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true))
23701
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousScreenVisibleRowIndex))
23705
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousScreenVisibleRowIndex, true, false, false);
23754
if (this.
ptCurrentCell
.X != -1)
23756
dataGridViewColumn = this.Columns.GetNextColumn(this.Columns[this.
ptCurrentCell
.X],
23780
if (this.
ptCurrentCell
.X == -1)
23799
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23803
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
23810
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
23811
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
23822
SetSelectedCellCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
23824
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, !this.MultiSelect, false, false);
23830
if (this.
ptCurrentCell
.X == -1)
23849
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23853
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
23858
SetSelectedCellCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
23859
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23875
if (this.
ptCurrentCell
.X == -1)
23894
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23898
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
23922
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, !this.MultiSelect, false, false);
23928
if (this.
ptCurrentCell
.X == -1)
23947
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23951
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
23957
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
23973
if (this.
ptCurrentCell
.X == -1)
23992
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
23996
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
24000
if (this.Columns[this.
ptCurrentCell
.X].Selected)
24032
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
24033
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
24040
SetSelectedCellCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
24043
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, !this.MultiSelect, false, false);
24049
if (this.
ptCurrentCell
.X == -1)
24068
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24072
if (this.
ptCurrentCell
.X == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
24076
if (this.Columns[this.
ptCurrentCell
.X].Selected)
24084
SetSelectedCellCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
24086
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24100
if (this.
ptCurrentCell
.X == -1)
24119
if (!ScrollIntoView(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24123
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex))
24127
success = SetCurrentCellAddressCore(nextVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24156
if (this.
ptCurrentCell
.X == -1)
24171
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24175
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24186
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
24187
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
24190
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, false, false, false);
24196
SetSelectedCellCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
24197
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24204
if (this.
ptCurrentCell
.X == -1)
24219
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24223
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24228
SetSelectedCellCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
24229
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24238
if (this.
ptCurrentCell
.X == -1)
24253
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24257
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24270
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, false, false, false);
24275
SetSelectedColumnCore(this.
ptCurrentCell
.X, false);
24277
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24284
if (this.
ptCurrentCell
.X == -1)
24299
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24303
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24309
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24318
if (this.
ptCurrentCell
.X == -1)
24333
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24337
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24348
if (this.Columns[this.
ptCurrentCell
.X].Selected)
24357
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
24358
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
24362
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, false, false, false);
24367
if (this.Columns[this.
ptCurrentCell
.X].Selected)
24369
SetSelectedColumnCore(this.
ptCurrentCell
.X, false);
24374
SetSelectedCellCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
24375
SetSelectedCellCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
24377
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24384
if (this.
ptCurrentCell
.X == -1)
24399
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24403
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24407
if (this.Columns[this.
ptCurrentCell
.X].Selected)
24415
SetSelectedCellCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true);
24417
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24424
if (this.
ptCurrentCell
.X == -1)
24439
if (!ScrollIntoView(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true))
24443
if (this.
ptCurrentCell
.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex))
24447
success = SetCurrentCellAddressCore(lastVisibleColumnIndex, this.
ptCurrentCell
.Y, true, false, false);
24467
this.
ptCurrentCell
.X != -1)
24485
if (this.selectedBandIndexes[bandIndex] != this.
ptCurrentCell
.X)
24496
if (!this.Columns[this.
ptCurrentCell
.X].Selected)
24498
Debug.Assert(!this.selectedBandIndexes.Contains(this.
ptCurrentCell
.X));
24499
SetSelectedColumnCore(this.
ptCurrentCell
.X, true);
24510
if (this.selectedBandIndexes[bandIndex] != this.
ptCurrentCell
.Y)
24521
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) == 0)
24523
Debug.Assert(!this.selectedBandIndexes.Contains(this.
ptCurrentCell
.Y));
24524
SetSelectedRowCore(this.
ptCurrentCell
.Y, true);
24751
if (this.
ptCurrentCell
.Y != -1)
24753
previousVisibleRowIndex = this.Rows.GetPreviousRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible);
24767
if (this.
ptCurrentCell
.X == -1)
24787
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
24791
if (this.ptAnchorCell.X == -1 || this.
ptCurrentCell
.X == -1 ||
24799
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
24800
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
24803
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, false, false, false);
24808
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
24812
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
24818
SetSelectedCellCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true);
24819
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
24826
if (this.
ptCurrentCell
.X == -1)
24841
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
24845
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
24850
SetSelectedCellCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true);
24851
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
24860
if (this.
ptCurrentCell
.X == -1)
24879
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
24883
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
24895
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
24896
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
24903
SetSelectedCellCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true);
24905
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, !this.MultiSelect, false, false);
24911
if (this.
ptCurrentCell
.X == -1)
24930
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
24934
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
24939
SetSelectedCellCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true);
24940
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true, false, false);
24952
if (this.
ptCurrentCell
.X == -1)
24969
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
24973
if (this.ptAnchorCell.X == -1 || this.
ptCurrentCell
.X == -1 ||
24981
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, false, false, false);
24986
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
24990
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
24994
SetSelectedRowCore(this.
ptCurrentCell
.Y, false);
24996
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
25003
if (this.
ptCurrentCell
.X == -1)
25018
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
25022
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
25028
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
25037
if (this.
ptCurrentCell
.X == -1)
25056
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
25060
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
25084
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, !this.MultiSelect, false, false);
25090
if (this.
ptCurrentCell
.X == -1)
25109
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
25113
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
25119
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true, false, false);
25131
if (this.
ptCurrentCell
.X == -1)
25148
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
25152
if (this.ptAnchorCell.X == -1 || this.
ptCurrentCell
.X == -1 ||
25158
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
25167
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
25168
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
25172
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, false, false, false);
25177
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
25181
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
25185
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
25187
SetSelectedRowCore(this.
ptCurrentCell
.Y, false);
25192
SetSelectedCellCore(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
25193
SetSelectedCellCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true);
25195
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
25202
if (this.
ptCurrentCell
.X == -1)
25217
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
25221
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
25225
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
25233
SetSelectedCellCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true);
25235
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
25244
if (this.
ptCurrentCell
.X == -1)
25263
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
25267
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
25271
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
25296
int oldEdgeColumnIndex = this.
ptCurrentCell
.X;
25297
int oldEdgeRowIndex = this.
ptCurrentCell
.Y;
25308
SetSelectedCellCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true);
25311
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, !this.MultiSelect, false, false);
25317
if (this.
ptCurrentCell
.X == -1)
25336
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
25340
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
25344
if ((this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Selected) != 0)
25352
SetSelectedCellCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true);
25354
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true, false, false);
25364
if (this.
ptCurrentCell
.X == -1)
25379
if (!ScrollIntoView(this.
ptCurrentCell
.X, firstVisibleRowIndex, true))
25383
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(firstVisibleRowIndex))
25387
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, firstVisibleRowIndex, true, false, false);
25393
if (this.
ptCurrentCell
.X == -1)
25412
if (!ScrollIntoView(this.
ptCurrentCell
.X, previousVisibleRowIndex, true))
25416
if (this.
ptCurrentCell
.X == -1 || IsRowOutOfBounds(previousVisibleRowIndex))
25420
success = SetCurrentCellAddressCore(this.
ptCurrentCell
.X, previousVisibleRowIndex, true, false, false);
25440
if (this.
ptCurrentCell
.X != -1 && !this.IsCurrentCellInEditMode && ColumnEditable(this.
ptCurrentCell
.X))
25445
if (!IsSharedCellReadOnly(dataGridViewCell, this.
ptCurrentCell
.Y) &&
25449
bool success = ScrollIntoView(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y, false);
25463
object nullValue = dataGridViewCurrentCell.GetInheritedStyle(null, this.
ptCurrentCell
.Y, false).NullValue;
25481
InvalidateCellPrivate(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
25516
DataGridViewCellParsingEventArgs dgvcpe = OnCellParsing(this.
ptCurrentCell
.Y,
25517
this.
ptCurrentCell
.X,
25528
dataGridViewCurrentCell = this.Rows[this.
ptCurrentCell
.Y].Cells[this.
ptCurrentCell
.X]; // unsharing the row before pushing the new value
25530
return dataGridViewCurrentCell.SetValueInternal(this.
ptCurrentCell
.Y, dgvcpe.Value);
25549
dataGridViewCurrentCell = this.Rows[this.
ptCurrentCell
.Y].Cells[this.
ptCurrentCell
.X]; // unsharing the row before pushing the new value
25551
return dataGridViewCurrentCell.SetValueInternal(this.
ptCurrentCell
.Y, val);
25637
if (this.
ptCurrentCell
.X != -1 && this.IsCurrentCellInEditMode)
25639
Debug.Assert(this.
ptCurrentCell
.Y != -1);
25641
DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(null, this.
ptCurrentCell
.Y, true);
26133
if (!committed && this.
ptCurrentCell
.X >= 0 &&
26135
forCurrentCellChange && (this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex),
26136
this.
ptCurrentCell
.Y != rowIndex /*forCurrentRowChange*/))
26150
if (!committed && this.
ptCurrentCell
.X >= 0 &&
26152
forCurrentCellChange && (this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex),
26153
this.
ptCurrentCell
.Y != rowIndex /*forCurrentRowChange*/))
26163
if (!committed && this.
ptCurrentCell
.X >= 0 &&
26165
forCurrentCellChange && (this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex),
26166
this.
ptCurrentCell
.Y != rowIndex /*forCurrentRowChange*/))
26318
if (this.
ptCurrentCell
.X >= 0 &&
26319
(this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex))
26378
if (!committed && this.
ptCurrentCell
.X >= 0 &&
26380
forCurrentCellChange && (this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex),
26381
this.
ptCurrentCell
.Y != rowIndex /*forCurrentRowChange*/))
26407
if (!committed && this.
ptCurrentCell
.X >= 0 &&
26409
forCurrentCellChange && (this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex),
26410
this.
ptCurrentCell
.Y != rowIndex /*forCurrentRowChange*/))
26456
(this.Rows.GetRowState(this.
ptCurrentCell
.Y) & DataGridViewElementStates.Frozen) == 0)
26867
if (this.
ptCurrentCell
.X != columnIndex || this.
ptCurrentCell
.Y != rowIndex)
26872
this.
ptCurrentCell
.X = columnIndex;
26873
this.
ptCurrentCell
.Y = rowIndex;
26886
int oldCurrentCellX = this.
ptCurrentCell
.X;
26887
int oldCurrentCellY = this.
ptCurrentCell
.Y;
26926
Debug.Assert(oldCurrentCellX == this.
ptCurrentCell
.X);
26927
Debug.Assert(oldCurrentCellY == this.
ptCurrentCell
.Y);
26991
this.
ptCurrentCell
.X = columnIndex;
26992
this.
ptCurrentCell
.Y = rowIndex;
27019
OnCellEnter(ref dataGridViewCellTmp, this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
27027
if (oldCurrentCellY != this.
ptCurrentCell
.Y && this.RowHeadersVisible && oldCurrentCellY < this.Rows.Count)
27032
InvalidateCellPrivate(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y);
27033
if (this.RowHeadersVisible && oldCurrentCellY != this.
ptCurrentCell
.Y)
27035
InvalidateCellPrivate(-1, this.
ptCurrentCell
.Y);
27038
this.
ptCurrentCell
.X != -1 &&
27054
if (this.
ptCurrentCell
.X != -1)
27056
AccessibilityNotifyCurrentCellChanged(new Point(this.
ptCurrentCell
.X, this.
ptCurrentCell
.Y));
27082
int oldCurrentCellX = this.
ptCurrentCell
.X;
27083
int oldCurrentCellY = this.
ptCurrentCell
.Y;
27118
Debug.Assert(oldCurrentCellX == this.
ptCurrentCell
.X);
27119
Debug.Assert(oldCurrentCellY == this.
ptCurrentCell
.Y);
27135
if (this.
ptCurrentCell
.X != -1)
27137
this.
ptCurrentCell
.X = -1;
27138
this.
ptCurrentCell
.Y = -1;
28235
this.ptCurrentCellCache.X = this.
ptCurrentCell
.X;
28236
this.ptCurrentCellCache.Y = this.
ptCurrentCell
.Y;
28553
if (this.
ptCurrentCell
.X != -1)
28555
dataGridViewColumn = this.Columns.GetNextColumn(this.Columns[this.
ptCurrentCell
.X],
28564
if (this.
ptCurrentCell
.Y != -1)
28566
nextVisibleRowIndex = this.Rows.GetNextRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible);
28573
if (this.
ptCurrentCell
.X == -1)
28586
targetRowIndex = this.
ptCurrentCell
.Y;
28600
if (this.
ptCurrentCell
.X == -1)
28620
if (this.
ptCurrentCell
.X == -1)
28640
if (this.
ptCurrentCell
.X == -1)
28650
if (targetRowIndex != this.
ptCurrentCell
.Y || this.MultiSelect)
28668
if (this.
ptCurrentCell
.X == -1)
28710
if (this.
ptCurrentCell
.X != -1)
28712
dataGridViewColumn = this.Columns.GetPreviousColumn(this.Columns[this.
ptCurrentCell
.X],
28722
if (this.
ptCurrentCell
.Y != -1)
28724
previousVisibleRowIndex = this.Rows.GetPreviousRow(this.
ptCurrentCell
.Y, DataGridViewElementStates.Visible);
28739
if (this.
ptCurrentCell
.X == -1)
28752
targetRowIndex = this.
ptCurrentCell
.Y;
28766
if (this.
ptCurrentCell
.X == -1)
28786
if (this.
ptCurrentCell
.X == -1)
28806
if (this.
ptCurrentCell
.X == -1)
28816
if (targetRowIndex != this.
ptCurrentCell
.Y || this.MultiSelect)
28834
if (this.
ptCurrentCell
.X == -1)
29144
PositionEditingControl(rowIndex == -1 || this.
ptCurrentCell
.Y != rowIndex, true, false);