957 references to Rows
PresentationUI (13)
MS\Internal\Documents\RMPublishingDialog.cs (1)
242foreach (DataGridViewRow row in rightsTable.Rows)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (12)
133Rows.Insert(0, CreateDataGridViewRow(user, isViewerOwner)); 139rowIndex = Rows.Add(CreateDataGridViewRow(user, isViewerOwner)); 147UpdateAllowOwner(Rows[rowIndex]); 154UpdateRowFromEveryone(Rows[_everyoneRowIndex], Rows[rowIndex]); 184this.Rows.Remove(row); 290foreach (DataGridViewRow row in Rows) 500if ((e != null) && (e.RowIndex > 0) && (e.RowIndex < Rows.Count) && 503DataGridViewDisableCheckBoxCell cell = Rows[e.RowIndex].Cells[e.ColumnIndex] as DataGridViewDisableCheckBoxCell; 624for (int rowIndex = _firstNonOwnerRow; rowIndex < Rows.Count; rowIndex++) 626DataGridViewRow currentRow = Rows[rowIndex]; 786everyoneRow = Rows[_everyoneRowIndex];
System.Windows.Forms (937)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (12)
80if (index < owner.Rows.GetRowCount(DataGridViewElementStates.Visible)) 82int actualRowIndex = owner.Rows.DisplayIndexToRowIndex(index); 83return owner.Rows[actualRowIndex].AccessibilityObject; 86index -= owner.Rows.GetRowCount(DataGridViewElementStates.Visible); 118int childCount = owner.Rows.GetRowCount(DataGridViewElementStates.Visible); 166return owner.Rows[hti.RowIndex].Cells[hti.ColumnIndex].AccessibilityObject; 179return owner.Rows[hti.RowIndex].HeaderCell.AccessibilityObject; 280int rowIndex = owner.Rows.DisplayIndexToRowIndex(i); 281result[i] = owner.Rows[rowIndex].HeaderCell.AccessibilityObject; 321row = owner.Rows.DisplayIndexToRowIndex(row); 323return owner.Rows[row].Cells[column].AccessibilityObject; 333return this.TryGetOwnerAs(out DataGridView? owner) ? owner.Rows.GetRowCount(DataGridViewElementStates.Visible) : base.RowCount;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (46)
1714Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1715DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1744if (!Columns[value.ColumnIndex].Visible || (Rows.GetRowState(value.RowIndex) & DataGridViewElementStates.Visible) == 0) 1782Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1783DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1803bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1821bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1855Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1857return Rows[_ptCurrentCell.Y]; 2288return Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // un-shares the row of first displayed cell 2309&& firstDisplayedCell.RowIndex < Rows.Count 2320if (!Rows[firstDisplayedCell.RowIndex].Frozen) 2340Y = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 2425int firstDisplayedRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2428if ((Rows.GetRowState(firstDisplayedRowIndex) & DataGridViewElementStates.Frozen) == 0 2532ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(value, Rows.Count); 2534if ((Rows.GetRowState(value) & DataGridViewElementStates.Visible) == 0) 2539if ((Rows.GetRowState(value) & DataGridViewElementStates.Frozen) != 0) 2555int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2587int rowsToScroll = Rows.GetRowCount(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, value); 2926DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 2937DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 2947DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 3101int rowCount = Rows.Count; 3121int rowCount = Rows.Count; 3124Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.ReadOnly) == 0); 3177get => Rows.Count; 3187if (value == Rows.Count) 3195Rows.Clear(); 3197else if (value < Rows.Count) 3200while (value < Rows.Count) 3202int currentRowCount = Rows.Count; 3203Rows.RemoveAt(currentRowCount - (AllowUserToAddRowsInternal ? 2 : 1)); 3204if (Rows.Count >= currentRowCount) 3221int rowsToAdd = value - Rows.Count; 3224Rows.Add(rowsToAdd); 3596int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 3647foreach (DataGridViewRow dataGridViewRow in Rows) // un-shares all rows! 3666DataGridViewRow dataGridViewRow = Rows[rowIndex]; // un-shares the selected row 3728strc.Add(Rows[rowIndex]); // un-shares the selected row 4013DataGridViewRow row = Rows[rowIndex]; 4018DataGridViewRow row = Rows[rowIndex]; 4029DataGridViewRow row = Rows[rowIndex]; 4034DataGridViewRow row = Rows[rowIndex]; 4093int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 4154&& Rows.GetFirstRow(DataGridViewElementStates.Visible) != -1;
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (14)
339int dataGridViewRowsCount = _owner.Rows.Count; 494&& CurrencyManager.List.Count == (_owner.AllowUserToAddRowsInternal ? _owner.Rows.Count - 1 : _owner.Rows.Count)) 596if (_owner.NewRowIndex == -1 || e.NewIndex != _owner.Rows.Count) 598_owner.Rows.InsertInternal(e.NewIndex, _owner.RowTemplateClone, force: true); 610_owner.Rows.RemoveAtInternal(e.NewIndex, force: true); 663if (_owner.Rows.Count > 0 689if (_owner.Rows.Count == (_owner.AllowUserToAddRowsInternal ? 1 : 0)) 763int result = _owner.Rows.Count; 764if (_owner.AllowUserToAddRowsInternal && _owner.Rows.Count > 0) 1244else if (rowIndex < _owner.Rows.Count) 1255if ((_owner.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 1258_owner.Rows[rowIndex].Visible = true; 1269&& rowIndex < _owner.Rows.Count
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (727)
27if (cellAddress.Y < 0 || cellAddress.Y >= Rows.Count) 32int visibleRowIndex = Rows.GetRowCount(DataGridViewElementStates.Visible, 0, cellAddress.Y); 73Rows.AddInternal(newRow: true, values: null); 74NewRowIndex = Rows.Count - 1; 79DataGridViewRowEventArgs dgvRowEvent = new(Rows[NewRowIndex]); 300Debug.Assert(rowIndex < Rows.Count); 314DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 370Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 380dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 390dataGridViewCell = Rows.SharedRow(rowIndex).HeaderCell; 403Rows.SharedRow(rowIndex).GetHeightInfo(rowIndex, out int height, out int minimumHeight); 418Rows[rowIndex].Thickness = preferredThickness; // un-sharing the resized row 450for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 452rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 458dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 467dataGridViewCell = Rows.SharedRow(rowIndex).HeaderCell; 480if (Rows.SharedRow(rowIndex).Height < preferredHeight) 482Rows[rowIndex].Height = preferredHeight; // un-sharing the row to be resized 497int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 501rowIndex = Rows.GetNextRow(rowIndex, 511rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 929int totalVisibleRowCount = Rows.GetRowCount(DataGridViewElementStates.Visible); 930int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 931int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 936if (DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 937&& DisplayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 1305for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1307rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1323int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 1327cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1328rowIndex = Rows.GetNextRow(rowIndex, 1342cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1343rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 1351int rowAboveFirstVisibleScrollingRow = Rows.GetPreviousRow(DisplayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 1363cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1364rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 1380if (Columns.Count == 0 && Rows.Count == 0) 1386&& (Rows.GetFirstRow(DataGridViewElementStates.Visible) == -1 1398allCellsSelected = _individualSelectedCells.Count == Columns.Count * Rows.Count; 1405for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1407rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1409dataGridViewRow = Rows[rowIndex]; // un-shares this row 1432allCellsSelected = _selectedBandIndexes.Count * Rows.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count; 1444for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1446rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1448dataGridViewRow = Rows[rowIndex]; // un-shares this row 1468allCellsSelected = _selectedBandIndexes.Count * Columns.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count; 1475for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1477rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1480((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 1481if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 1483dataGridViewRow = Rows[rowIndex]; // un-shares this row 1953ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 2026rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2030? Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, Rows.SharedRow(rowIndex).GetHeight(rowIndex))) 2031: Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2040rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2043DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 2050rowIndex = Rows.GetNextRow( 2060DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 2067rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 2076for (rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2078rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 2081? Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, Rows.SharedRow(rowIndex).GetHeight(rowIndex))) 2082: Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2128ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 2147&& rowIndex != Rows.GetFirstRow(DataGridViewElementStates.Visible)) 2154DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 2188rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2192? Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))) 2193: Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2202rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2205DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndexTmp); 2212rowIndexTmp = Rows.GetNextRow( 2222DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndexTmp); 2229rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 2238for (rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2240rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible)) 2243? Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))) 2244: Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2276Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 2294DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 2313Rows[rowIndex].ThicknessInternal = preferredThickness; // un-sharing the resized row 2320Rows[rowIndex].ThicknessInternal = preferredThickness; // un-sharing the resized row 2324Rows[rowIndex].Thickness = preferredThickness; // un-sharing the resized row 2405int rowIndex = Rows.GetNextRow(rowIndexStart - 1, DataGridViewElementStates.Visible); 2413rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 2579Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2773clip.Y = topEdge + Rows.SharedRow(index).GetMinimumHeight(index) - mouseBarOffset - 1; 3132Debug.Assert((AllowUserToAddRowsInternal && Rows.Count == 1) || (!AllowUserToAddRowsInternal && Rows.Count == 0)); 3134if (Rows.Count > 0) 3138int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 3209Debug.Assert(Rows.GetFirstRow(DataGridViewElementStates.Visible) == 0); 3482ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexException, Rows.Count); 3491ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexException, Rows.Count); 4148if (rowIndex >= Rows.Count) 4154int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 4172if (rowIndex > -1 && (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 4271int indexTmp = Rows.Count; 4282DataGridViewElementStates rowState = Rows.GetRowState(indexTmp); 4290indexTmp = Rows.GetPreviousRow( 4298rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 4308indexTmp = Rows.GetPreviousRow( 4314rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 4327int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 4333height += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 4334rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 4346int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 4347return Rows.GetRowsHeight(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, lastVisibleRowIndex) + 4348Rows.SharedRow(lastVisibleRowIndex).GetHeight(lastVisibleRowIndex); 4536int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 4537int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 4771int nRows = Rows.Count; 4789DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 4797cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 4833&& ((Rows.GetRowState(firstDisplayedScrollingRow) & DataGridViewElementStates.Frozen) != 0 4834|| (Rows.GetRowState(firstDisplayedScrollingRow) & DataGridViewElementStates.Visible) == 0)) 4841if ((Rows.GetRowState(i) & DataGridViewElementStates.Visible) != 0) 4843cy += Rows.SharedRow(i).GetHeight(i); 4858if ((Rows.GetRowState(i) & (DataGridViewElementStates.Frozen | DataGridViewElementStates.Visible)) == DataGridViewElementStates.Visible) 4860int height = Rows.SharedRow(i).GetHeight(i); 5220Debug.Assert(anticipatedRowIndex >= 0 && anticipatedRowIndex <= Rows.Count); 5222int previousRowIndex = Rows.GetPreviousRow( 5228&& (Rows.GetRowState(previousRowIndex) & DataGridViewElementStates.Frozen) == 0 5235int nextRowIndex = Rows.GetNextRow( 5241&& (Rows.GetRowState(nextRowIndex) & DataGridViewElementStates.Frozen) != 0 5254int rowIndexTmp = Rows.GetPreviousRow(rowIndexInserted, DataGridViewElementStates.Visible); 5257previousRowFrozen = (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen; 5261rowIndexTmp = Rows.GetNextRow(rowIndexInserted - 1, DataGridViewElementStates.Visible); 5265nextRowFrozen = (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen; 5288if (((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) != 0 && !frozenStateChanging) 5289|| ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0 && frozenStateChanging)) 5292rowIndexTmp = Rows.GetPreviousRow(rowIndex, 5296int dataGridViewRowFirst = Rows.GetFirstRow(DataGridViewElementStates.Visible); 5305Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Frozen, true); 5306rowIndexTmp = Rows.GetNextRow(rowIndexTmp, 5314rowIndexTmp = Rows.GetNextRow(rowIndex, 5322rowIndexTmp = Rows.GetNextRow(dataGridViewRowLast, 5338Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Frozen, false); 5339rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, 5348int rowsCount = Rows.Count; 5351DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 5374int rowsCount = Rows.Count; 5377DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 5449Debug.Assert(Rows.Count > 1); 5452DataGridViewRowCancelEventArgs dgvrce = new(Rows[NewRowIndex]); 5460Debug.Assert(NewRowIndex == Rows.Count - 1); 5461DataGridViewRow dataGridViewRow = Rows[NewRowIndex]; 5462Rows.RemoveAtInternal(NewRowIndex, force: false); 5472NewRowIndex = Rows.Count - 1; 5473Debug.Assert((Rows.GetRowState(NewRowIndex) & DataGridViewElementStates.Visible) != 0); 5476OnDefaultValuesNeeded(new DataGridViewRowEventArgs(Rows[NewRowIndex])); 5803if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5814if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5828if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5875if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5883if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5891if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5899if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5907if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 6323DataGridViewRow dataGridViewRow = Rows.SharedRow(_trackRow); 6335dataGridViewRow = Rows[_trackRow]; // Un-sharing row 6391Debug.Assert(rowIndex < Rows.Count); 6392Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 6393Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0); 6401int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6433if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6435Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 6438rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6446rowIndexTmp = Rows.GetPreviousRow(DisplayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6447while (rowIndexTmp != -1 && (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6449Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6450rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6459rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6462while (rowIndexTmp != -1 && (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6464Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6465rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6470rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6474if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6476Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 6479rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6484while (rowIndexTmp != -1 && (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6486Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6487rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6496int firstDisplayedFrozenRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6499? Rows.GetNextRow( 6509? Rows.GetNextRow( 6521if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6527Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6528rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6534&& rowIndexTmp < Rows.Count 6540if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6546Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6547rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6558rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible, DisplayedBandsInfo.OldNumDisplayedScrollingRows - 1); 6561rowIndexTmp = Rows.GetLastRow(DataGridViewElementStates.Visible); 6569if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6571Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6574rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible); 6580rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6583rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DisplayedBandsInfo.OldNumDisplayedFrozenRows - 1); 6586rowIndexTmp = Rows.GetLastRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6594if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6596Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6599rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible); 6606for (rowIndexTmp = 0; rowIndexTmp < Rows.Count; rowIndexTmp++) 6608DataGridViewElementStates rowStateDbg = Rows.GetRowState(rowIndexTmp); 6620if (!ColumnHeadersVisible && Rows.GetRowCount(DataGridViewElementStates.Visible) == 0) 6867return cellCount + _selectedBandIndexes.Count * Rows.Count; 6904for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 6906DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 6925DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 6942return Rows.Count * Columns.Count; 6951for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 6953DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 6954if (!visibleRequired || (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0) 6981DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 7058ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 7103Debug.Assert(rowIndex >= -1 && rowIndex < Rows.Count); 7106DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 7148if (Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) == 0) 7155includeColumnHeaders = (Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Selected) == -1); 7287int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7289int nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7300cellContent = Rows.SharedRow(rowIndex) 7318cellContent = Rows.SharedRow(rowIndex) 7337cellContent = Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal( 7357cellContent = Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal( 7374cellContent = Rows.SharedRow(rowIndex) 7392cellContent = Rows.SharedRow(rowIndex) 7412nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7450int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 7581nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 7595cellContent = Rows.SharedRow(rowIndex) 7613cellContent = Rows.SharedRow(rowIndex) 7632cellContent = Rows.SharedRow(rowIndex) 7654cellContent = Rows.SharedRow(rowIndex) 7673cellContent = Rows.SharedRow(rowIndex) 7691cellContent = Rows.SharedRow(rowIndex) 7711nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 7738selectedVisibleRowExists = Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) != 0; 7744selectedVisibleCellExists = selectedVisibleColumnExists && Rows.GetRowCount(DataGridViewElementStates.Visible) != 0; 7819if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0) 7838firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 7839int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 8016nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 8041cellContent = Rows.SharedRow(rowIndex) 8061cellContent = Rows.SharedRow(rowIndex) 8081cellContent = Rows.SharedRow(rowIndex) 8111cellContent = Rows.SharedRow(rowIndex) 8562int visibleRowsHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 8563int frozenVisibleRowsHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 8595&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 8597&& (Rows.GetRowState(_trackRowEdge) & DataGridViewElementStates.Frozen) != 0 8599&& (Rows.GetRowState(hti._row) & DataGridViewElementStates.Frozen) == 0) 8603int firstUnfrozenRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 8633&& ((Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 8634|| (_trackRowEdge != -1 && (Rows.GetRowState(_trackRowEdge) & DataGridViewElementStates.Frozen) == 0)) 8652if (VerticalScrollingOffset + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) <= 8696int firstRowIndex = hti._row >= 0 ? hti._row : Rows.GetFirstRow(DataGridViewElementStates.Visible); 8814if (((_ptAnchorCell.Y != -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8815|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 8837if (VerticalScrollingOffset + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) <= 9010int preferredHeight = Math.Min(minimumHeight + Rows.GetRowsHeight(DataGridViewElementStates.Visible), proposedConstraints.Height); 9023ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 9030Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 9032if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) == 0) 9041for (indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9055cy += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9056indexTmp = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9076cy += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9077indexTmp = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 9084int displayHeight = cutOverflow && cy + Rows.SharedRow(indexTmp).GetHeight(indexTmp) > data.Bottom 9086: Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9119int indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9122rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9130indexTmp = Rows.GetNextRow(indexTmp, 9138Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 9139&& (Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 9143rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9151indexTmp = Rows.GetNextRow(indexTmp, 9195Debug.Assert(index >= 0 && index < Rows.Count); 9196Debug.Assert((Rows.GetRowState(index) & DataGridViewElementStates.Visible) != 0); 9200int indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9208y += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9209indexTmp = Rows.GetNextRow(indexTmp, 9231indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 9237Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 9238&& (Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 9247y += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9248indexTmp = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 9255indexTmp = Rows.GetPreviousRow(DisplayedBandsInfo.FirstDisplayedScrollingRow, 9260y -= Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9266indexTmp = Rows.GetPreviousRow(indexTmp, 9424int rowHeight = Rows.SharedRow(hti._row).GetHeight(hti._row); 9441indexTmp = Rows.GetPreviousRow(hti._row, DataGridViewElementStates.Visible); 9566int rowHeight = Rows.SharedRow(hti._row).GetHeight(hti._row); 9580indexTmp = Rows.GetPreviousRow(hti._row, 9605int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 9694dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9782ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 9849ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 9856Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 9870Rows.InvalidateCachedRowsHeights(); 9885Debug.Assert(lo < Rows.Count); 9886Debug.Assert(hi < Rows.Count); 9888if (Rows.GetRowCount(DataGridViewElementStates.Visible) == 0) 9899if ((Rows.GetRowState(lo) & DataGridViewElementStates.Visible) == 0) 9901lo = Rows.GetNextRow(lo, DataGridViewElementStates.Visible); 9911if ((Rows.GetRowState(hi) & DataGridViewElementStates.Visible) == 0) 9913hi = Rows.GetPreviousRow(hi, DataGridViewElementStates.Visible); 9924if ((Rows.GetRowState(lo) & DataGridViewElementStates.Frozen) != 0) 9936&& Rows.GetRowCount( 9961if ((Rows.GetRowState(hi) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen) 9973else if (Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) == 0) 9988if ((Rows.GetRowState(i) & DataGridViewElementStates.Visible) == 0) 10041return columnIndex >= Columns.Count || rowIndex >= Rows.Count || columnIndex == -1 || rowIndex == -1; 10046return rowIndex >= Rows.Count || rowIndex == -1; 10157int totalVisibleRowCount = Rows.GetRowCount(DataGridViewElementStates.Visible); 10162int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 10163int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 10183if (DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10184&& DisplayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10212&& DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10213&& DisplayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10269if (DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10388&& (includeNewRow || !AllowUserToAddRowsInternal || firstDisplayedCellAddress.Y != Rows.Count - 1)) 10589Debug.Assert(rowIndex == Rows.Count - 1); 10593DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 10596DataGridViewRow dataGridViewRowDebug = Rows.SharedRow(rowIndex); 10607DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10623DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 10637int rowHeight = Rows.SharedRow(rowIndex).GetHeight(rowIndex); 10638Rows.SharedRow(rowIndex).CachedThickness = rowHeight; 10655if (Rows.GetRowCount(DataGridViewElementStates.Visible) > 1) 10785if (Rows.Count > 0) 10797_ = Rows[NewRowIndex]; 10804for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 10806DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10826for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 10828DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10866if (Rows.Count > 0 && dataGridViewColumn.CellType is null) 10933if (Rows.Count > 0) 10942_ = Rows[NewRowIndex]; 10956for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 10958DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10977for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 10979DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 11004CorrectRowFrozenState(dataGridViewRow, rowState, Rows.Count); 11073CorrectRowFrozenStates(dataGridViewRows, rowIndexInserted: Rows.Count); 11329for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 11331rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 11334int rowHeight = Rows.SharedRow(rowIndex).GetHeight(rowIndex); 11335Rows.SharedRow(rowIndex).CachedThickness = rowHeight; 11509ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(e.RowIndex, Rows.Count, "e.RowIndex"); 11550_ = Rows[e.RowIndex]; 11583rowDisplayed = (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 11634_ = Rows[e.RowIndex]; 11659_ = Rows[e.RowIndex]; 11704_ = Rows[e.RowIndex]; 11732Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 11733dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 11820Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 11821dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 11851_ = Rows[e.RowIndex]; 11872_ = Rows[e.RowIndex]; 11936_ = Rows[e.RowIndex]; 12103if (hti._row >= Rows.Count) 12105int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 12129&& IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row) 12284&& (Columns[hti._col].Selected || IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row)) 12395if (isControlDown && ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)) 12407&& _ptAnchorCell.Y > -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12463else if ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) == 0) 12466((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)); 12489&& (((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0) 12490|| IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row)) 12617_ = Rows[e.RowIndex]; 12640_ = Rows[e.RowIndex]; 12660_ = Rows[e.RowIndex]; 12718_ = Rows[e.RowIndex]; 13056Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 13057dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 13102Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 13103dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 13196Rows.ClearInternal(recreateNewRow: false); 13213int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Displayed); 13216_lstRows.Add(Rows[rowIndex]); 13220rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Displayed); 13277if (Columns.Count != 0 && Rows.Count == 0) 13696int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 14443&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14664dataGridViewRow = Rows[index]; 14785Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 14806&& (Rows.GetRowState(rowIndex) & DataGridViewElementStates.ReadOnly) == 0 14850Debug.Assert(!Rows[dataGridViewCell.RowIndex].ReadOnly); 14981int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 14982int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 15317forceCurrentCellSelection: Rows.GetRowCount(DataGridViewElementStates.Visible) == 1); 15420if (Rows.Count > 0) 15432_ = Rows[NewRowIndex]; 15439for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 15441DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 15460for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 15462DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 15683_ = Rows[_ptCurrentCell.Y]; 15742_ = Rows[_ptCurrentCell.Y]; 15776_ = Rows[_ptCurrentCell.Y]; 15897if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15918if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15929if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15986if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16036if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16048if (rowIndex < Rows.Count) 16058Debug.Assert(Rows[rowIndex].Resizable == DataGridViewTriState.True); 16160&& _ptMouseEnteredCell.Y >= -1 && _ptMouseEnteredCell.Y < Rows.Count) 16382if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16581int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 16583&& _vertScrollBar.Value + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) 16589Debug.Assert(totalVisibleFrozenHeight == Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 16594if (_vertScrollBar.Value + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) 16861&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 17104Rows.ClearInternal(recreateNewRow: false); 17110for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 17112DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 17237Debug.Assert(rowIndexDeleted >= 0 && rowIndexDeleted < Rows.Count); 17239if (rowIndexDeleted >= 0 && rowIndexDeleted < Rows.Count) 17241foreach (DataGridViewCell cell in Rows[rowIndexDeleted].Cells) 17256int rowIndexPrevious = Rows.GetPreviousRow(rowIndexDeleted, DataGridViewElementStates.Visible); 17257int rowIndexNext = Rows.GetNextRow(rowIndexDeleted, DataGridViewElementStates.Visible); 17261Debug.Assert(NewRowIndex == Rows.Count - 1); 17262newY = rowIndexNext > -1 && rowIndexNext < Rows.Count - 1 ? rowIndexNext - 1 : rowIndexPrevious; 17535&& Rows.Count == 0 17560DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 17614if (!e.Handled && e.Button == MouseButtons.Left && e.RowIndex < Rows.Count) 17659if (rowIndex < Rows.Count && columnIndex < Columns.Count) 17668DataGridViewRowEventArgs dgvre = new(Rows[NewRowIndex]); 17700if (calledAddNewOnTheDataConnection && rowIndex > Rows.Count - 1) 17703rowIndex = Math.Min(rowIndex, Rows.Count - 1); 17725Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 17726dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 17780DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 17868rowDisplayed = (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 17886&& rowIndex == Rows.GetFirstRow(DataGridViewElementStates.Visible))) 17940if (isControlDown && ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)) 18008if (hti._row >= Rows.Count) 18010int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 18035else if ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Visible) == 0) 18048&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18113else if ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) == 0) 18116((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)); 18320if (rowIndex < Rows.Count && columnIndex < Columns.Count) 18332Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 18333dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 18420SelectRowRange(Rows.GetNextRow(_trackRowEdge, DataGridViewElementStates.Visible), 18426SelectRowRange(Rows.GetNextRow(hti._row, DataGridViewElementStates.Visible), 18432SelectRowRange(Rows.GetNextRow(_trackRow, DataGridViewElementStates.Visible), 18439Rows.GetPreviousRow(_trackRowEdge, DataGridViewElementStates.Visible), 18446Rows.GetPreviousRow(hti._row, DataGridViewElementStates.Visible), 18453Rows.GetPreviousRow(_trackRow, DataGridViewElementStates.Visible), 18459SelectRowRange(Rows.GetNextRow(_trackRow, DataGridViewElementStates.Visible), 18462Rows.GetPreviousRow(_trackRow, DataGridViewElementStates.Visible), 18469Rows.GetPreviousRow(_trackRow, DataGridViewElementStates.Visible), 18471SelectRowRange(Rows.GetNextRow(_trackRow, DataGridViewElementStates.Visible), 18562newState = Rows.GetRowState(rowIndex); 18605Rows.SetRowState(rowIndex, DataGridViewElementStates.Displayed, false); 18616bool rowDisplayed = (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 18642dataGridViewRow = Rows[rowIndex]; 18656if (rowVisible && Rows.GetRowCount(DataGridViewElementStates.Visible) > 1) 18732if (dataGridViewCell is not null && rowIndex < Rows.Count && columnIndex < Columns.Count) 18734dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 18779Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 18780dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 18858int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 18864rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 19083int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19132rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19136if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 19143Debug.Assert((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0); 19144rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19152Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 19153rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19163Debug.Assert((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Visible) != 0); 19169if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 19176Debug.Assert((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0); 19177rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 19185Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 19186rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 19207int visibleRowsHeight = Rows.GetRowsHeight(DataGridViewElementStates.Displayed); 19496if (Columns.Count > 0 || Rows.Count > 0) 19563indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19577int rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19578Rows.SharedRow(indexTmp).CachedThickness = rowHeight; 19582rowBounds.Height = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19590indexTmpNext = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19594dataGridViewRow = Rows.SharedRow(indexTmp); 19599Rows.GetRowState(indexTmp), 19618Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 19619Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0); 19633int rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19634Rows.SharedRow(indexTmp).CachedThickness = rowHeight; 19638rowBounds.Height = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19646indexTmpNext = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 19650dataGridViewRow = Rows.SharedRow(indexTmp); 19655Rows.GetRowState(indexTmp), 19769DataGridViewRow newRow = Rows.SharedRow(NewRowIndex); 19775newRow = Rows[NewRowIndex]; // un-share the 'new row'. 19821Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19835if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19837int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19946if (rowIndex == NewRowIndex || rowIndex >= Rows.Count) 19952DataGridViewRowCancelEventArgs dgvrce = new(Rows[rowIndex]); 19956DataGridViewRow dataGridViewRow = Rows[rowIndex]; 19959int dataGridRowsCount = Rows.Count; 19961int dataGridViewRowsCount = Rows.Count; // the number of rows in the dataGridView row collection not counting the AddNewRow 20009if (dataGridRowsCount != Rows.Count) 20022Rows.RemoveAtInternal(rowIndex, force: false); 20149int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 20159nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20698if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20735if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20787if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20847if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20945if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21072int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 21073int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 21155&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21176&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21193&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21547int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 21629&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21650&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21667&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22073int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 22930nextScreenVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 22941if ((Rows.GetRowState(nextScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 22945int firstDisplayedScrollingRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 22953jumpRows = Rows.GetRowCount(DataGridViewElementStates.Visible, 22974nextScreenVisibleRowIndexTmp = Rows.GetNextRow(nextScreenVisibleRowIndex, DataGridViewElementStates.Visible); 23112if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23139if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23191previousScreenVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 23202int jumpRows = (Rows.GetRowState(previousScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0 23215previousScreenVisibleRowIndexTmp = Rows.GetPreviousRow(previousScreenVisibleRowIndex, DataGridViewElementStates.Visible); 23224if ((Rows.GetRowState(previousScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 23227int firstDisplayedScrollingRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 23237previousScreenVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 23370if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23397if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23452int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 24314if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24532int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 24541previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24964if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24996if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25037if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25085if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25167if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25333Debug.Assert(NewRowIndex == Rows.Count - 1); 25334Rows.RemoveAtInternal(NewRowIndex, force: false); 25363dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25388dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25407Rows.ClearInternal(recreateNewRow: false); 25528Rows.ClearInternal(recreateNewRow: true); 25552Rows.AddInternal(RowTemplateClone); 25556Rows.AddCopiesInternal(0, rowsCount - 1); 25605foreach (DataGridViewRow row in Rows) 25923for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 25925rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 25927DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 25946DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 25955Debug.Assert(rowIndex < Rows.Count); 25957DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 26202Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 26203Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= -1 && DisplayedBandsInfo.FirstDisplayedScrollingRow < Rows.Count); 26205Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 26262Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 26264if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0) 26277rowsToScroll = Rows.GetRowCount(DataGridViewElementStates.Visible, rowIndex, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26284int yRowBottomEdge = GetRowYFromIndex(rowIndex) + Rows.SharedRow(rowIndex).GetHeight(rowIndex); 26287yRowBottomEdge -= Rows.SharedRow(firstDisplayedScrollingRow).GetHeight(firstDisplayedScrollingRow); 26291firstDisplayedScrollingRow = Rows.GetNextRow(firstDisplayedScrollingRow, DataGridViewElementStates.Visible); 26319Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 26327int frozenRowsThickness = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 26350if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26378int firstVisibleScrollingRow = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 26380int newScrolledOffRowCount = Rows.GetRowCount(DataGridViewElementStates.Visible, firstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26399deltaY -= Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26400newFirstVisibleScrollingRow = Rows.GetNextRow( 26417deltaY = -Rows.GetRowsHeight(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26418rows = Rows.GetRowCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26431newFirstVisibleScrollingRow = Rows.GetPreviousRow( 26437deltaY += Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26465deltaY = Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26468newFirstVisibleScrollingRow = Rows.GetNextRow(newFirstVisibleScrollingRow, DataGridViewElementStates.Visible); 26475deltaY += Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26481newFirstVisibleScrollingRow = Rows.GetPreviousRow( 26486deltaY = -Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26489int scrollingRowTmp = Rows.GetPreviousRow(newFirstVisibleScrollingRow, 26494deltaY -= Rows.SharedRow(scrollingRowTmp).GetHeight(scrollingRowTmp); 26516scrollHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26517rowCount = Rows.GetRowCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26522scrollHeight = -Rows.GetRowsHeight(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, oldFirstVisibleScrollingRow); 26523rowCount = -Rows.GetRowCount(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, oldFirstVisibleScrollingRow); 26553int rowIndex = 0, maxRowIndex = Rows.Count; 26557_ = Rows[rowIndex]; 26574int rowIndex = 0, maxRowIndex = Rows.Count; 26577DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 26617int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 26658if (index >= Rows.Count) 26660index -= Rows.Count; 26666return Rows.SharedRow(index).Cells[columnIndex]; 26693return Rows.SharedRow(rowIndex).Cells[index]; 26745ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 26763&& !IsSharedCellVisible(Rows.SharedRow(rowIndex).Cells[columnIndex], rowIndex)) 26781Debug.Assert(rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count); 26825currentCell = Rows.SharedRow(oldCurrentCellY).Cells[oldCurrentCellX]; 26829currentCell = Rows[oldCurrentCellY].Cells[oldCurrentCellX]; 26909if (rowIndex >= Rows.Count) 26940currentCell = Rows[rowIndex].Cells[columnIndex]; 26948if (oldCurrentCellX < Columns.Count && oldCurrentCellY < Rows.Count) 26953if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 27038currentCell = Rows.SharedRow(oldCurrentCellY).Cells[oldCurrentCellX]; 27042currentCell = Rows[oldCurrentCellY].Cells[oldCurrentCellX]; 27112if (oldCurrentCellX < Columns.Count && oldCurrentCellY < Rows.Count) 27117if (RowHeadersVisible && oldCurrentCellY < Rows.Count) 27335if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 27468Debug.Assert(columnIndex >= 0 && rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count); 27471DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 27472DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 27475DataGridViewCell dataGridViewCell = Rows[rowIndex].Cells[columnIndex]; 27499dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27504for (int row = rowIndex + 1; row < Rows.Count; row++) 27506dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27514Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, false); 27517dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27524dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27577Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 27579DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 27597Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, true); 27602Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, false); 27618ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 27621DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 27622DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 27625DataGridViewCell dataGridViewCell = Rows[rowIndex].Cells[columnIndex]; 27648if (Rows.Count > BulkPaintThreshold) 27662dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27667for (int row = rowIndex + 1; row < Rows.Count; row++) 27669dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27694Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, false); 27697dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27704dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27732if (!Columns[columnIndex].Visible || (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 27867if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 27870((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 27876if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0) 27879((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 28064ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28069DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 28080Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, true); 28087Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, false); 28238int visibleFrozenRows = Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28241int rowVFIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28243Rows.SetRowState(rowVFIndex, DataGridViewElementStates.Frozen, false); 28244Debug.Assert(Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) == 0); 28277Rows.Sort(comparer!, direction == ListSortDirection.Ascending); 28305int rowVIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 28309rowVIndex = Rows.GetNextRow(rowVIndex, DataGridViewElementStates.Visible); 28314Rows.SetRowState(rowVIndex, DataGridViewElementStates.Frozen, true); 28422int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28429if (_vertScrollBar.Value + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) <= 28453int firstDisplayedScrollingRowHeight = Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow); 28489int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 28510nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28650int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 28671previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28679int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 28860ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28874ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28929ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28940ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexStart, Rows.Count); 28943ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexEnd, Rows.Count); 28973ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28975Rows.InvalidateCachedRowsHeights(); 28977bool rowVisible = (rowIndex >= 0 && (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 29016rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 29112rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 29116if (((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) == displayed) 29118Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, displayed); 29121rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 29135if (((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) == displayed) 29137Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, displayed); 29140rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 29167&& _ptMouseEnteredCell.Y < Rows.Count) 29194&& _ptMouseEnteredCell.Y < Rows.Count) 29295Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29305Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29320Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29330Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29349Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29372Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29411Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29435Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29456Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29492Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29548Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29561Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29595Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29611Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29638Rows.GetNextRow(anchorRowIndex, DataGridViewElementStates.Visible), 29692Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29708Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29742Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29758Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29785Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29806Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29815Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29832Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29841Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29977dataGridViewCell = Rows.SharedRow(hti._row).Cells[hti._col]; 29985dataGridViewCell = Rows.SharedRow(hti._row).HeaderCell;
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (1)
208return _ownerDataGridView.Rows.Count == 0 ? null : Parent.GetChild(1);
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (2)
792DataGridView.Rows.InvalidateCachedRowCount(elementState); 793DataGridView.Rows.InvalidateCachedRowsHeight(elementState);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
483rowIndex < DataGridView.Rows.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (3)
82DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 125DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 170DataGridViewRowCollection dataGridViewRows = DataGridView.Rows;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (28)
155Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).State); 257Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).State); 305if (i < 0 || i >= DataGridView.Rows.Count - 1) 313|| string.IsNullOrEmpty(DataGridView.Rows[i].Cells[j].Value?.ToString())) 318_nonEmptyNeighbors.Add(DataGridView.Rows[i].Cells[j].AccessibilityObject.Bounds); 436Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).State); 506Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).State); 538Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).State); 743Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).State); 964DataGridViewElementStates rowState = DataGridView.Rows.GetRowState(rowIndex); 990isLastVisibleRow: rowIndex == DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)); 1293ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1717ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1787ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1793if (DataGridView.Rows.SharedRow(rowIndex) != OwningRow) 1798DataGridViewElementStates rowEffectiveState = DataGridView.Rows.GetRowState(rowIndex); 1854Debug.Assert(state == stateDebug || DataGridView.Rows.SharedRow(rowIndex).Index == -1); 1867ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1901if (DataGridView.Rows.SharedRow(rowIndex).HasDefaultCellStyle) 1903rowStyle = DataGridView.Rows.SharedRow(rowIndex).DefaultCellStyle; 2405ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, dataGridView.Rows.Count); 3034if (DataGridView is not null && e.ColumnIndex < DataGridView.Columns.Count && e.RowIndex < DataGridView.Rows.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (8)
62: _owner.DataGridView.Rows.GetVisibleIndex(_owner.OwningRow) + RowStartIndex; 466if (_owner.OwningRow.Index == _owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 474int previousVisibleRow = _owner.DataGridView.Rows.GetPreviousRow(_owner.OwningRow.Index, DataGridViewElementStates.Visible); 475return _owner.DataGridView.Rows[previousVisibleRow].Cells[_owner.OwningColumn.Index].AccessibilityObject; 479if (_owner.OwningRow.Index == _owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 485int nextVisibleRow = _owner.DataGridView.Rows.GetNextRow(_owner.OwningRow.Index, DataGridViewElementStates.Visible); 486return _owner.DataGridView.Rows[nextVisibleRow].Cells[_owner.OwningColumn.Index].AccessibilityObject; 738? _owner.DataGridView.Rows.GetVisibleIndex(_owner.OwningRow)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (3)
80if (RowIndex < -1 || RowIndex >= _dataGridView.Rows.Count) 109if (RowIndex < -1 || RowIndex >= _dataGridView.Rows.Count) 144if (RowIndex < -1 || RowIndex >= _dataGridView.Rows.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
834rowIndex < DataGridView.Rows.Count) 972rowIndex < 0 || rowIndex >= DataGridView.Rows.Count) 977int visibleRowIndex = DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, rowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (5)
86DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 129DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 173DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 213DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 267DataGridViewRowCollection dataGridViewRows = DataGridView.Rows;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (8)
951for (rowIndex = dataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible); 953rowIndex = dataGridView.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 955dataGridViewRow = dataGridView.Rows.SharedRow(rowIndex); 976rowIndex = dataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 979dataGridViewRow = dataGridView.Rows.SharedRow(rowIndex); 995rowIndex = dataGridView.Rows.GetNextRow(rowIndex, 1004dataGridViewRow = dataGridView.Rows.SharedRow(rowIndex); 1020rowIndex = dataGridView.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (1)
1067foreach (DataGridViewRow row in DataGridView.Rows)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1767DataGridViewElementStates rowState = DataGridView.Rows.GetRowState(rowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (11)
52DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 115DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 161DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 204DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 248DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 292DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 333DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 396DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 439DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 480DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 522DataGridViewRowCollection dataGridViewRows = DataGridView.Rows;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
234(DataGridView is not null && (rowIndex < 0 || rowIndex >= DataGridView.Rows.Count))) 239if (DataGridView is not null && DataGridView.Rows.SharedRow(rowIndex) != OwningRow) 363ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 365if (DataGridView.Rows.SharedRow(rowIndex) != OwningRow)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (3)
93DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 167DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 207DataGridViewRowCollection dataGridViewRows = DataGridView.Rows;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
733rowIndex < DataGridView.Rows.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (7)
51DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 120DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 162DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 212DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 257DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 300DataGridViewRowCollection dataGridViewRows = DataGridView.Rows; 342DataGridViewRowCollection dataGridViewRows = DataGridView.Rows;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (10)
1215ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1242ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1291ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1372ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1375if (DataGridView is null || DataGridView.Rows.SharedRow(rowIndex).Index != -1) 1386return DataGridView.Rows.GetRowState(rowIndex); 1398DataGridView.Rows.InvalidateCachedRowCount(elementState); 1399DataGridView.Rows.InvalidateCachedRowsHeight(elementState); 1426DataGridViewRow sharedRow = dataGridView.Rows.SharedRow(rowIndex); 1468sharedRow = dataGridView.Rows.SharedRow(rowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (5)
35? dataGridView.Rows.GetVisibleIndex(_owningDataGridViewRow) + 1 36: dataGridView.Rows.GetVisibleIndex(_owningDataGridViewRow) 98? _owningDataGridViewRow.DataGridView.Rows.GetVisibleIndex(_owningDataGridViewRow) + RowStartIndex 341if (_owningDataGridViewRow.Index != _owningDataGridViewRow.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 355if (_owningDataGridViewRow.Index != _owningDataGridViewRow.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible))
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
100ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 297ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 567ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (6)
155if (Owner.OwningRow.Index == Owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 160int nextVisibleRow = Owner.DataGridView.Rows.GetNextRow(Owner.OwningRow.Index, DataGridViewElementStates.Visible); 161int actualDisplayIndex = Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, nextVisibleRow); 174if (Owner.OwningRow.Index == Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 187int previousVisibleRow = Owner.DataGridView.Rows.GetPreviousRow(Owner.OwningRow.Index, DataGridViewElementStates.Visible); 188int actualDisplayIndex = Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, previousVisibleRow);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (10)
64if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 69_dataGridView.Rows.SharedRow(RowIndex).DrawFocus( 81if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 86_dataGridView.Rows.SharedRow(RowIndex).PaintCells( 99if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 110_dataGridView.Rows.SharedRow(RowIndex).PaintCells( 123if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 128_dataGridView.Rows.SharedRow(RowIndex).PaintCells( 152if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 157_dataGridView.Rows.SharedRow(RowIndex).PaintHeader(
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (10)
81if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 86_dataGridView.Rows.SharedRow(RowIndex).DrawFocus( 98if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 103_dataGridView.Rows.SharedRow(RowIndex).PaintCells( 116if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 127_dataGridView.Rows.SharedRow(RowIndex).PaintCells( 140if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 145_dataGridView.Rows.SharedRow(RowIndex).PaintCells( 169if (RowIndex < 0 || RowIndex >= _dataGridView.Rows.Count) 174_dataGridView.Rows.SharedRow(RowIndex).PaintHeader(
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxColumn.cs (1)
63DataGridViewRowCollection dataGridViewRows = DataGridView.Rows;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellAccessibleObject.cs (3)
209Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible) > 0) 213DataGridViewRow row = Owner.DataGridView.Rows[Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)];
System.Windows.Forms.Design (7)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (7)
57_sampleDataGridViewSelected.Rows.Add(row); 58_sampleDataGridViewSelected.Rows[0].Selected = true; 67_sampleDataGridView.Rows.Add(row); 306_sampleDataGridView.Rows[0].Height = _sampleDataGridView.Height; 309_sampleDataGridViewSelected.Rows[0].Height = _sampleDataGridViewSelected.Height; 320Debug.Assert(e.Cell == _sampleDataGridView.Rows[0].Cells[0], "the sample data grid view has only one cell"); 332dataGridView.Rows[0].Height = dataGridView.Height;