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