19 writes to currentRow
System.Windows.Forms (19)
winforms\Managed\System\WinForms\DataGrid.cs (18)
961
this.
currentRow
= this.ListManager.Position;
964
this.
currentRow
= -1;
990
this.
currentRow
= this.ListManager.Position;
993
this.
currentRow
= -1;
1002
currentRow
= newRow;
1048
currentRow
= (currentRow == localGridRowsLength - 1) ? DataGridRowsLength - 1 : currentRow;
1080
currentRow
= currentRowSaved;
1098
currentRow
= newRow;
1104
currentRow
= newRow;
1678
currentRow
= listManager.Position == -1 ? 0 : listManager.Position;
1741
currentRow
= value;
3138
currentRow
= Math.Min(currentRow, this.listManager.Count);
3688
currentRow
= currentRowSaved;
6938
currentRow
= this.ListManager.Position == -1 ? 0 : this.ListManager.Position;
7060
this.
currentRow
= listManager.Position == -1 ? 0 : listManager.Position;
8092
this.
currentRow
= this.listManager.Count == 0 ? 0 : this.listManager.Position;
8830
currentRow
= 0;
8832
currentRow
= this.listManager.Position == -1 ? 0 : listManager.Position;
winforms\Managed\System\WinForms\DataGridState.cs (1)
131
dataGrid.
currentRow
= CurrentRow;
105 references to currentRow
System.Windows.Forms (105)
winforms\Managed\System\WinForms\DataGrid.cs (104)
899
return new DataGridCell(
currentRow
, currentCol);
906
if (value.RowNumber ==
currentRow
&& value.ColumnNumber == currentCol)
914
int currentRowSaved =
currentRow
;
971
InvalidateRow(
currentRow
);
976
if (
currentRow
!= newRow) {
999
if (
currentRow
< localGridRowsLength)
1000
localGridRows[
currentRow
].OnRowLeave();
1005
InvalidateRow(
currentRow
);
1026
this.ListManager.Position = this.
currentRow
;
1048
currentRow = (
currentRow
== localGridRowsLength - 1) ? DataGridRowsLength - 1 :
currentRow
;
1051
if (
currentRow
== dataGridRowsLength - 1 && policy.AllowAdd) {
1057
Debug.Assert(this.DataGridRows[
currentRow
] is DataGridAddNewRow, "the last row is the DataGridAddNewRow");
1059
Debug.Assert(ListManager.Position ==
currentRow
|| listManager.Position == -1, "the listManager should be positioned at the last row");
1062
ListManager.Position =
currentRow
;
1082
Debug.Assert(
currentRow
== ListManager.Position || listManager.Position == -1, "the position in the list manager (" + ListManager.Position + ") is out of sync with the currentRow (" +
currentRow
+ ")" + " and the exception is '" + errorMessage + "'");
1087
InvalidateRowHeader(
currentRow
);
1096
if (
currentRow
== this.DataGridRowsLength - 1 && currentRowSaved == this.DataGridRowsLength - 2 && DataGridRows[
currentRow
] is DataGridAddNewRow)
1112
EnsureVisible(
currentRow
, currentCol);
1132
Debug.Assert(
currentRow
== ListManager.Position || listManager.Position == -1, "the position in the list manager is out of sync with the currentRow");
1146
currentCellAccIndex += (this.
currentRow
* this.myGridTable.GridColumnStyles.Count) + this.currentCol;
1170
this.CurrentCell = new DataGridCell(
currentRow
, value);
3138
currentRow = Math.Min(
currentRow
, this.listManager.Count);
3220
if (
currentRow
< this.DataGridRowsLength) {
3221
InvalidateRow(
currentRow
);
3243
if (this.ListManager.Position !=
currentRow
) {
3357
if (editColumn != null && ea.Index ==
currentRow
)
3670
int currentRowSaved =
currentRow
;
3690
Debug.Assert(
currentRow
== ListManager.Position || listManager.Position == -1, "the position in the list manager (" + ListManager.Position + ") is out of sync with the currentRow (" +
currentRow
+ ")" + " and the exception is '" + errorMessage + "'");
3692
InvalidateRowHeader(
currentRow
);
3703
this.listManager.Position =
currentRow
;
4100
int savedCurrentRow = this.
currentRow
;
4103
this.
currentRow
!= location.row &&
4104
this.
currentRow
== savedCurrentRow) {
4173
EnsureVisible(
currentRow
, currentCol);
5240
bool retVal = editColumn.Commit(ListManager,
currentRow
);
5894
Debug.WriteLineIf(CompModSwitches.DataGridEditing.TraceVerbose, "DataGridEditing: Edit, currentRow = " +
currentRow
.ToString(CultureInfo.InvariantCulture) +
5908
localGridRows[
currentRow
].OnEdit();
5909
editRow = localGridRows[
currentRow
];
5922
if (
currentRow
< firstVisibleRow ||
currentRow
> firstVisibleRow + numVisibleRows ||
5930
cellBounds = GetCellBounds(
currentRow
, currentCol);
5944
currentRow
,
6030
Debug.Assert(
currentRow
>= firstVisibleRow &&
currentRow
<= firstVisibleRow + numVisibleRows, "how can one edit a row which is invisible?");
6033
if (bounds.IsEmpty && this.editColumn is DataGridTextBoxColumn && this.
currentRow
!= -1 && this.currentCol != -1) {
6037
Rectangle editBounds = this.GetCellBounds(this.
currentRow
, this.currentCol);
6070
InvalidateRowHeader(this.
currentRow
);
6073
localGridRows[
currentRow
].LoseChildFocus(layout.RowHeaders, isRightToLeft());
7059
if (this.listManager.Position != this.
currentRow
) {
7475
if (listManager != null && DataGridRowsLength > 0 && localGridRows[
currentRow
].OnKeyPress(keyData)) {
7514
if (
currentRow
< ListManager.Count)
7520
string text = column.GetDisplayText(column.GetColumnValueAtRow(ListManager,
currentRow
));
7712
int savedCurrentRow =
currentRow
;
7736
if (gridRows[
currentRow
].Selected) {
7737
if (
currentRow
>= 1) {
7738
if (gridRows[
currentRow
- 1].Selected) {
7739
if (
currentRow
>= DataGridRowsLength - 1 || !gridRows[
currentRow
+1].Selected) {
7741
gridRows[
currentRow
].Selected = false;
7744
numSelectedRows += gridRows[
currentRow
-1].Selected ? 0:1;
7745
gridRows[
currentRow
- 1].Selected = true;
7751
gridRows[
currentRow
].Selected = true;
7752
if (
currentRow
>= 1) {
7753
numSelectedRows += gridRows[
currentRow
-1].Selected ? 0:1;
7754
gridRows[
currentRow
-1].Selected = true;
7788
int savedCurrentRow =
currentRow
;
7794
for (int i = savedCurrentRow; i <=
currentRow
; i++)
7797
numSelectedRows =
currentRow
- savedCurrentRow + 1;
7815
if (gridRows[
currentRow
].Selected) {
7818
if (
currentRow
< DataGridRowsLength - (policy.AllowAdd ? 1:0) - 1) {
7819
if (gridRows[
currentRow
+ 1].Selected) {
7820
if (
currentRow
== 0 || !gridRows[
currentRow
- 1].Selected) {
7822
gridRows[
currentRow
].Selected = false;
7825
numSelectedRows += gridRows[
currentRow
+ 1].Selected ? 0:1;
7826
gridRows[
currentRow
+ 1].Selected = true;
7833
gridRows[
currentRow
].Selected = true;
7836
if (
currentRow
< DataGridRowsLength - (policy.AllowAdd ? 1:0) - 1) {
7838
numSelectedRows += gridRows[
currentRow
].Selected ? 0:1;
7839
gridRows[
currentRow
].Selected = true;
7893
gridRows[
currentRow
].Selected = true;
7907
int savedCurrentRow =
currentRow
;
7908
CurrentRow = Math.Min(DataGridRowsLength - (policy.AllowAdd ? 2:1),
currentRow
+ numTotallyVisibleRows);
7911
for (int i = savedCurrentRow; i <=
currentRow
; i++)
7941
int savedCurrentRow =
currentRow
;
7945
for (int i = savedCurrentRow; i >=
currentRow
; i--)
7985
if (currentCol == firstColumnMarkedVisible &&
currentRow
!= 0)
7995
if (
currentRow
== 0)
8017
if (currentCol == lastColumnMarkedVisible &&
currentRow
!= DataGridRowsLength - 1)
8056
int currentRowSaved =
currentRow
;
8110
int savedCurrentRow =
currentRow
;
8117
for (int i = savedCurrentRow; i <=
currentRow
; i++)
8121
numSelectedRows =
currentRow
- savedCurrentRow + 1;
8153
CurrentRow =
currentRow
+ 1;
8181
if (layout.RowHeadersVisible && this.
currentRow
> -1) {
8182
Rectangle rowHdrRect = GetRowRect(this.
currentRow
);
8362
if ((this.
currentRow
== this.DataGridRowsLength -1) && ((keyData & Keys.Shift) == 0)) {
8418
if (this.
currentRow
== 0 && ((keyData & Keys.Shift) == Keys.Shift)) {
8464
InvalidateRow(this.
currentRow
);
8634
InvalidateRowHeader(
currentRow
);
winforms\Managed\System\WinForms\DataGridState.cs (1)
93
this.CurrentRow = dataGrid.
currentRow
;