9 writes to newRowIndex
System.Windows.Forms (9)
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (1)
541this.owner.newRowIndex = -1;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (8)
86this.newRowIndex = this.Rows.Count - 1; 5364this.newRowIndex = -1; // No more 'new' row. 5368this.newRowIndex--; 5390this.newRowIndex += insertionCount; 5486this.newRowIndex = this.Rows.Count - 1; 10766this.newRowIndex = rowIndex; 13682this.newRowIndex = -1; 15050this.newRowIndex = -1;
53 references to newRowIndex
System.Windows.Forms (53)
winforms\Managed\System\WinForms\DataGridView.cs (1)
3826return this.newRowIndex;
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (5)
514if (!this.dataConnectionState[DATACONNECTIONSTATE_finishedAddNew] && this.owner.newRowIndex == e.NewIndex) 915if (this.owner.newRowIndex == this.currencyManager.List.Count) 918deleteAddNewRow = (rowIndex == this.owner.newRowIndex - 1); 923Debug.Assert(this.owner.newRowIndex == this.currencyManager.List.Count - 1); 924deleteAddNewRow = (rowIndex == this.owner.newRowIndex);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (47)
83Debug.Assert(this.newRowIndex == -1); 91DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs(this.Rows[this.newRowIndex]); 3298if (discardNewRow && this.ptCurrentCell.Y == this.newRowIndex - 1) 3307this.ptCurrentCell.Y == this.newRowIndex - 1 && 5362if (this.newRowIndex == rowIndexDeleted) 5366else if (this.newRowIndex != -1) 5388if (this.newRowIndex != -1) 5465Debug.Assert(this.newRowIndex != -1); 5467DataGridViewRowCancelEventArgs dgvrce = new DataGridViewRowCancelEventArgs(this.Rows[this.newRowIndex]); 5475Debug.Assert(this.newRowIndex == this.Rows.Count - 1); 5476DataGridViewRow dataGridViewRow = this.Rows[this.newRowIndex]; 5477this.Rows.RemoveAtInternal(this.newRowIndex, false /*force*/); 5482Debug.Assert(this.newRowIndex == -1); 5487Debug.Assert((this.Rows.GetRowState(this.newRowIndex) & DataGridViewElementStates.Visible) != 0); 5488Debug.Assert(this.ptCurrentCell.Y == this.newRowIndex); 5490OnDefaultValuesNeeded(new DataGridViewRowEventArgs(this.Rows[this.newRowIndex])); 5491InvalidateRowPrivate(this.newRowIndex); 10761if (this.AllowUserToAddRowsInternal && this.newRowIndex == -1) 10950if (dataGridViewColumn.CellTemplate.DefaultNewRowValue != null && this.newRowIndex != -1) 10953DataGridViewRow newRow = this.Rows[this.newRowIndex]; 10967if (rowIndex == this.newRowIndex) 11085if (dataGridViewColumn.CellTemplate.DefaultNewRowValue != null && this.newRowIndex != -1) 11088DataGridViewRow newRow = this.Rows[this.newRowIndex]; 11109if (rowIndex == this.newRowIndex) 15044if (this.IsCurrentCellDirty && this.newRowIndex == this.ptCurrentCell.Y) 15046Debug.Assert(this.newRowIndex != -1); 15914if (dataGridViewColumn.CellTemplate.DefaultNewRowValue != null && this.newRowIndex != -1) 15917DataGridViewRow newRow = this.Rows[this.newRowIndex]; 15931if (rowIndex == this.newRowIndex) 17705Debug.Assert(this.newRowIndex != -1); 17706Debug.Assert(this.newRowIndex == this.Rows.Count-1); 18124if (!validationFailureOccurred && this.AllowUserToAddRowsInternal && this.newRowIndex == rowIndex) 18130DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs(this.Rows[this.newRowIndex]); 18150InvalidateRowPrivate(this.newRowIndex); 19302if (rowIndex == this.newRowIndex) 19646this.newRowIndex == this.ptCurrentCell.Y) 20316if (this.newRowIndex != -1) 20318DataGridViewRow newRow = this.Rows.SharedRow(this.newRowIndex); 20324newRow = this.Rows[this.newRowIndex]; // unshare the 'new row'. 20331dataGridViewCell.SetValueInternal(this.newRowIndex, dataGridViewCell.DefaultNewRowValue); 20482if (rowIndex == this.newRowIndex || rowIndex >= this.Rows.Count) 25495if (this.Columns.Count > 0 && this.newRowIndex == -1) 25500else if (this.newRowIndex != -1) 25503Debug.Assert(this.newRowIndex == this.Rows.Count - 1); 25504this.Rows.RemoveAtInternal(this.newRowIndex, false /*force*/); 28345Debug.Assert(rowIndex1 != this.newRowIndex); 28346Debug.Assert(rowIndex2 != this.newRowIndex);