945 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 (925)
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 (44)
1719Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1720DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1749if (!Columns[value.ColumnIndex].Visible || (Rows.GetRowState(value.RowIndex) & DataGridViewElementStates.Visible) == 0) 1787Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1788DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1808bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1826bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1860Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1862return Rows[_ptCurrentCell.Y]; 2293return Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // un-shares the row of first displayed cell 2314&& firstDisplayedCell.RowIndex < Rows.Count 2325if (!Rows[firstDisplayedCell.RowIndex].Frozen) 2345Y = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 2430int firstDisplayedRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2433if ((Rows.GetRowState(firstDisplayedRowIndex) & DataGridViewElementStates.Frozen) == 0 2537ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(value, Rows.Count); 2539if ((Rows.GetRowState(value) & DataGridViewElementStates.Visible) == 0) 2544if ((Rows.GetRowState(value) & DataGridViewElementStates.Frozen) != 0) 2560int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2592int rowsToScroll = Rows.GetRowCount(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, value); 2931DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 2942DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 2952DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 3106int rowCount = Rows.Count; 3182get => Rows.Count; 3192if (value == Rows.Count) 3200Rows.Clear(); 3202else if (value < Rows.Count) 3205while (value < Rows.Count) 3207int currentRowCount = Rows.Count; 3208Rows.RemoveAt(currentRowCount - (AllowUserToAddRowsInternal ? 2 : 1)); 3209if (Rows.Count >= currentRowCount) 3226int rowsToAdd = value - Rows.Count; 3229Rows.Add(rowsToAdd); 3601int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 3652foreach (DataGridViewRow dataGridViewRow in Rows) // un-shares all rows! 3671DataGridViewRow dataGridViewRow = Rows[rowIndex]; // un-shares the selected row 3733strc.Add(Rows[rowIndex]); // un-shares the selected row 4018DataGridViewRow row = Rows[rowIndex]; 4023DataGridViewRow row = Rows[rowIndex]; 4034DataGridViewRow row = Rows[rowIndex]; 4039DataGridViewRow row = Rows[rowIndex]; 4098int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 4159&& Rows.GetFirstRow(DataGridViewElementStates.Visible) != -1;
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (13)
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 (719)
72if (cellAddress.Y < 0 || cellAddress.Y >= Rows.Count) 77int visibleRowIndex = Rows.GetRowCount(DataGridViewElementStates.Visible, 0, cellAddress.Y); 118Rows.AddInternal(newRow: true, values: null); 119NewRowIndex = Rows.Count - 1; 124DataGridViewRowEventArgs dgvRowEvent = new(Rows[NewRowIndex]); 345Debug.Assert(rowIndex < Rows.Count); 359DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 415Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 425dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 435dataGridViewCell = Rows.SharedRow(rowIndex).HeaderCell; 448Rows.SharedRow(rowIndex).GetHeightInfo(rowIndex, out int height, out int minimumHeight); 463Rows[rowIndex].Thickness = preferredThickness; // un-sharing the resized row 495for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 497rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 503dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 512dataGridViewCell = Rows.SharedRow(rowIndex).HeaderCell; 525if (Rows.SharedRow(rowIndex).Height < preferredHeight) 527Rows[rowIndex].Height = preferredHeight; // un-sharing the row to be resized 542int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 546rowIndex = Rows.GetNextRow(rowIndex, 556rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 974int totalVisibleRowCount = Rows.GetRowCount(DataGridViewElementStates.Visible); 975int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 976int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 981if (DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 982&& DisplayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 1350for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1352rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1368int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 1372cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1373rowIndex = Rows.GetNextRow(rowIndex, 1387cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1388rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 1396int rowAboveFirstVisibleScrollingRow = Rows.GetPreviousRow(DisplayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 1408cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1409rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 1425if (Columns.Count == 0 && Rows.Count == 0) 1431&& (Rows.GetFirstRow(DataGridViewElementStates.Visible) == -1 1443allCellsSelected = _individualSelectedCells.Count == Columns.Count * Rows.Count; 1450for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1452rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1454dataGridViewRow = Rows[rowIndex]; // un-shares this row 1477allCellsSelected = _selectedBandIndexes.Count * Rows.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count; 1489for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1491rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1493dataGridViewRow = Rows[rowIndex]; // un-shares this row 1513allCellsSelected = _selectedBandIndexes.Count * Columns.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count; 1520for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 1522rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1525((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 1526if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 1528dataGridViewRow = Rows[rowIndex]; // un-shares this row 1998ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 2071rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2075? Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, Rows.SharedRow(rowIndex).GetHeight(rowIndex))) 2076: Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2085rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2088DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 2095rowIndex = Rows.GetNextRow( 2105DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 2112rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 2121for (rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2123rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 2126? Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, Rows.SharedRow(rowIndex).GetHeight(rowIndex))) 2127: Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2173ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 2192&& rowIndex != Rows.GetFirstRow(DataGridViewElementStates.Visible)) 2199DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 2233rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2237? Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))) 2238: Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2247rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2250DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndexTmp); 2257rowIndexTmp = Rows.GetNextRow( 2267DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndexTmp); 2274rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 2283for (rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible); 2285rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible)) 2288? Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))) 2289: Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2321Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 2339DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 2358Rows[rowIndex].ThicknessInternal = preferredThickness; // un-sharing the resized row 2365Rows[rowIndex].ThicknessInternal = preferredThickness; // un-sharing the resized row 2369Rows[rowIndex].Thickness = preferredThickness; // un-sharing the resized row 2450int rowIndex = Rows.GetNextRow(rowIndexStart - 1, DataGridViewElementStates.Visible); 2458rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 2624Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2818clip.Y = topEdge + Rows.SharedRow(index).GetMinimumHeight(index) - mouseBarOffset - 1; 3191Debug.Assert((AllowUserToAddRowsInternal && Rows.Count == 1) || (!AllowUserToAddRowsInternal && Rows.Count == 0)); 3193if (Rows.Count > 0) 3197int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 3268Debug.Assert(Rows.GetFirstRow(DataGridViewElementStates.Visible) == 0); 3541ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexException, Rows.Count); 3550ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexException, Rows.Count); 4207if (rowIndex >= Rows.Count) 4213int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 4231if (rowIndex > -1 && (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 4330int indexTmp = Rows.Count; 4341DataGridViewElementStates rowState = Rows.GetRowState(indexTmp); 4349indexTmp = Rows.GetPreviousRow( 4357rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 4367indexTmp = Rows.GetPreviousRow( 4373rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 4386int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 4392height += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 4393rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 4405int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 4406return Rows.GetRowsHeight(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, lastVisibleRowIndex) + 4407Rows.SharedRow(lastVisibleRowIndex).GetHeight(lastVisibleRowIndex); 4595int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 4596int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 4830int nRows = Rows.Count; 4848DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 4856cy += Rows.SharedRow(rowIndex).GetHeight(rowIndex); 4892&& ((Rows.GetRowState(firstDisplayedScrollingRow) & DataGridViewElementStates.Frozen) != 0 4893|| (Rows.GetRowState(firstDisplayedScrollingRow) & DataGridViewElementStates.Visible) == 0)) 4900if ((Rows.GetRowState(i) & DataGridViewElementStates.Visible) != 0) 4902cy += Rows.SharedRow(i).GetHeight(i); 4917if ((Rows.GetRowState(i) & (DataGridViewElementStates.Frozen | DataGridViewElementStates.Visible)) == DataGridViewElementStates.Visible) 4919int height = Rows.SharedRow(i).GetHeight(i); 5279Debug.Assert(anticipatedRowIndex >= 0 && anticipatedRowIndex <= Rows.Count); 5281int previousRowIndex = Rows.GetPreviousRow( 5287&& (Rows.GetRowState(previousRowIndex) & DataGridViewElementStates.Frozen) == 0 5294int nextRowIndex = Rows.GetNextRow( 5300&& (Rows.GetRowState(nextRowIndex) & DataGridViewElementStates.Frozen) != 0 5313int rowIndexTmp = Rows.GetPreviousRow(rowIndexInserted, DataGridViewElementStates.Visible); 5316previousRowFrozen = (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen; 5320rowIndexTmp = Rows.GetNextRow(rowIndexInserted - 1, DataGridViewElementStates.Visible); 5324nextRowFrozen = (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen; 5347if (((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) != 0 && !frozenStateChanging) 5348|| ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0 && frozenStateChanging)) 5351rowIndexTmp = Rows.GetPreviousRow(rowIndex, 5355int dataGridViewRowFirst = Rows.GetFirstRow(DataGridViewElementStates.Visible); 5364Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Frozen, true); 5365rowIndexTmp = Rows.GetNextRow(rowIndexTmp, 5373rowIndexTmp = Rows.GetNextRow(rowIndex, 5381rowIndexTmp = Rows.GetNextRow(dataGridViewRowLast, 5397Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Frozen, false); 5398rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, 5407int rowsCount = Rows.Count; 5410DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 5433int rowsCount = Rows.Count; 5436DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 5508Debug.Assert(Rows.Count > 1); 5511DataGridViewRowCancelEventArgs dgvrce = new(Rows[NewRowIndex]); 5519Debug.Assert(NewRowIndex == Rows.Count - 1); 5520DataGridViewRow dataGridViewRow = Rows[NewRowIndex]; 5521Rows.RemoveAtInternal(NewRowIndex, force: false); 5531NewRowIndex = Rows.Count - 1; 5532Debug.Assert((Rows.GetRowState(NewRowIndex) & DataGridViewElementStates.Visible) != 0); 5535OnDefaultValuesNeeded(new DataGridViewRowEventArgs(Rows[NewRowIndex])); 5862if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5873if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5887if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5934if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5942if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5950if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5958if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5966if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 6382DataGridViewRow dataGridViewRow = Rows.SharedRow(_trackRow); 6394dataGridViewRow = Rows[_trackRow]; // Un-sharing row 6450Debug.Assert(rowIndex < Rows.Count); 6451Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 6452Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0); 6460int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6492if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6494Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 6497rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6505rowIndexTmp = Rows.GetPreviousRow(DisplayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6506while (rowIndexTmp != -1 && (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6508Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6509rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6518rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6521while (rowIndexTmp != -1 && (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6523Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6524rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6529rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6533if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6535Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 6538rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6543while (rowIndexTmp != -1 && (Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6545Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6546rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6555int firstDisplayedFrozenRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6558? Rows.GetNextRow( 6568? Rows.GetNextRow( 6580if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6586Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6587rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6593&& rowIndexTmp < Rows.Count 6599if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6605Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6606rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6617rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible, DisplayedBandsInfo.OldNumDisplayedScrollingRows - 1); 6620rowIndexTmp = Rows.GetLastRow(DataGridViewElementStates.Visible); 6628if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6630Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6633rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible); 6639rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6642rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DisplayedBandsInfo.OldNumDisplayedFrozenRows - 1); 6645rowIndexTmp = Rows.GetLastRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6653if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6655Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6658rowIndexTmp = Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible); 6679if (!ColumnHeadersVisible && Rows.GetRowCount(DataGridViewElementStates.Visible) == 0) 6926return cellCount + _selectedBandIndexes.Count * Rows.Count; 6963for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 6965DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 6984DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 7001return Rows.Count * Columns.Count; 7010for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 7012DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 7013if (!visibleRequired || (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0) 7040DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 7117ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 7162Debug.Assert(rowIndex >= -1 && rowIndex < Rows.Count); 7165DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 7207if (Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) == 0) 7214includeColumnHeaders = (Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Selected) == -1); 7346int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7348int nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7359cellContent = Rows.SharedRow(rowIndex) 7377cellContent = Rows.SharedRow(rowIndex) 7396cellContent = Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal( 7416cellContent = Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal( 7433cellContent = Rows.SharedRow(rowIndex) 7451cellContent = Rows.SharedRow(rowIndex) 7471nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7509int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 7640nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 7654cellContent = Rows.SharedRow(rowIndex) 7672cellContent = Rows.SharedRow(rowIndex) 7691cellContent = Rows.SharedRow(rowIndex) 7713cellContent = Rows.SharedRow(rowIndex) 7732cellContent = Rows.SharedRow(rowIndex) 7750cellContent = Rows.SharedRow(rowIndex) 7770nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 7797selectedVisibleRowExists = Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) != 0; 7803selectedVisibleCellExists = selectedVisibleColumnExists && Rows.GetRowCount(DataGridViewElementStates.Visible) != 0; 7878if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0) 7897firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 7898int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 8075nextRowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 8100cellContent = Rows.SharedRow(rowIndex) 8120cellContent = Rows.SharedRow(rowIndex) 8140cellContent = Rows.SharedRow(rowIndex) 8170cellContent = Rows.SharedRow(rowIndex) 8621int visibleRowsHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 8622int frozenVisibleRowsHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 8654&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 8656&& (Rows.GetRowState(_trackRowEdge) & DataGridViewElementStates.Frozen) != 0 8658&& (Rows.GetRowState(hti._row) & DataGridViewElementStates.Frozen) == 0) 8662int firstUnfrozenRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 8692&& ((Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 8693|| (_trackRowEdge != -1 && (Rows.GetRowState(_trackRowEdge) & DataGridViewElementStates.Frozen) == 0)) 8711if (VerticalScrollingOffset + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) <= 8755int firstRowIndex = hti._row >= 0 ? hti._row : Rows.GetFirstRow(DataGridViewElementStates.Visible); 8873if (((_ptAnchorCell.Y != -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8874|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 8896if (VerticalScrollingOffset + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) <= 9069int preferredHeight = Math.Min(minimumHeight + Rows.GetRowsHeight(DataGridViewElementStates.Visible), proposedConstraints.Height); 9082ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 9089Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 9091if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) == 0) 9100for (indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9114cy += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9115indexTmp = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9135cy += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9136indexTmp = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 9143int displayHeight = cutOverflow && cy + Rows.SharedRow(indexTmp).GetHeight(indexTmp) > data.Bottom 9145: Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9178int indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9181rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9189indexTmp = Rows.GetNextRow(indexTmp, 9197Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 9198&& (Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 9202rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9210indexTmp = Rows.GetNextRow(indexTmp, 9254Debug.Assert(index >= 0 && index < Rows.Count); 9255Debug.Assert((Rows.GetRowState(index) & DataGridViewElementStates.Visible) != 0); 9259int indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9267y += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9268indexTmp = Rows.GetNextRow(indexTmp, 9290indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 9296Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 9297&& (Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 9306y += Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9307indexTmp = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 9314indexTmp = Rows.GetPreviousRow(DisplayedBandsInfo.FirstDisplayedScrollingRow, 9319y -= Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9325indexTmp = Rows.GetPreviousRow(indexTmp, 9483int rowHeight = Rows.SharedRow(hti._row).GetHeight(hti._row); 9500indexTmp = Rows.GetPreviousRow(hti._row, DataGridViewElementStates.Visible); 9625int rowHeight = Rows.SharedRow(hti._row).GetHeight(hti._row); 9639indexTmp = Rows.GetPreviousRow(hti._row, 9664int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 9753dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9841ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 9908ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 9915Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 9929Rows.InvalidateCachedRowsHeights(); 9944Debug.Assert(lo < Rows.Count); 9945Debug.Assert(hi < Rows.Count); 9947if (Rows.GetRowCount(DataGridViewElementStates.Visible) == 0) 9958if ((Rows.GetRowState(lo) & DataGridViewElementStates.Visible) == 0) 9960lo = Rows.GetNextRow(lo, DataGridViewElementStates.Visible); 9970if ((Rows.GetRowState(hi) & DataGridViewElementStates.Visible) == 0) 9972hi = Rows.GetPreviousRow(hi, DataGridViewElementStates.Visible); 9983if ((Rows.GetRowState(lo) & DataGridViewElementStates.Frozen) != 0) 9995&& Rows.GetRowCount( 10020if ((Rows.GetRowState(hi) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen) 10032else if (Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) == 0) 10047if ((Rows.GetRowState(i) & DataGridViewElementStates.Visible) == 0) 10100return columnIndex >= Columns.Count || rowIndex >= Rows.Count || columnIndex == -1 || rowIndex == -1; 10105return rowIndex >= Rows.Count || rowIndex == -1; 10216int totalVisibleRowCount = Rows.GetRowCount(DataGridViewElementStates.Visible); 10221int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 10222int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 10242if (DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10243&& DisplayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10271&& DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10272&& DisplayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10328if (DisplayedBandsInfo.NumTotallyDisplayedFrozenRows == Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 10447&& (includeNewRow || !AllowUserToAddRowsInternal || firstDisplayedCellAddress.Y != Rows.Count - 1)) 10648Debug.Assert(rowIndex == Rows.Count - 1); 10652DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 10666DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10682DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 10696int rowHeight = Rows.SharedRow(rowIndex).GetHeight(rowIndex); 10697Rows.SharedRow(rowIndex).CachedThickness = rowHeight; 10714if (Rows.GetRowCount(DataGridViewElementStates.Visible) > 1) 10844if (Rows.Count > 0) 10856_ = Rows[NewRowIndex]; 10863for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 10865DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10885for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 10887DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 10925if (Rows.Count > 0 && dataGridViewColumn.CellType is null) 10992if (Rows.Count > 0) 11001_ = Rows[NewRowIndex]; 11015for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 11017DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 11036for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 11038DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 11063CorrectRowFrozenState(dataGridViewRow, rowState, Rows.Count); 11132CorrectRowFrozenStates(dataGridViewRows, rowIndexInserted: Rows.Count); 11388for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 11390rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 11393int rowHeight = Rows.SharedRow(rowIndex).GetHeight(rowIndex); 11394Rows.SharedRow(rowIndex).CachedThickness = rowHeight; 11568ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(e.RowIndex, Rows.Count, "e.RowIndex"); 11609_ = Rows[e.RowIndex]; 11642rowDisplayed = (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 11693_ = Rows[e.RowIndex]; 11718_ = Rows[e.RowIndex]; 11763_ = Rows[e.RowIndex]; 11791Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 11792dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 11879Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 11880dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 11910_ = Rows[e.RowIndex]; 11931_ = Rows[e.RowIndex]; 11995_ = Rows[e.RowIndex]; 12162if (hti._row >= Rows.Count) 12164int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 12188&& IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row) 12343&& (Columns[hti._col].Selected || IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row)) 12454if (isControlDown && ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)) 12466&& _ptAnchorCell.Y > -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12522else if ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) == 0) 12525((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)); 12548&& (((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0) 12549|| IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row)) 12676_ = Rows[e.RowIndex]; 12699_ = Rows[e.RowIndex]; 12719_ = Rows[e.RowIndex]; 12777_ = Rows[e.RowIndex]; 13115Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 13116dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 13161Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 13162dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 13255Rows.ClearInternal(recreateNewRow: false); 13272int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Displayed); 13275_lstRows.Add(Rows[rowIndex]); 13279rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Displayed); 13336if (Columns.Count != 0 && Rows.Count == 0) 13755int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 14502&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14723dataGridViewRow = Rows[index]; 14844Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 14865&& (Rows.GetRowState(rowIndex) & DataGridViewElementStates.ReadOnly) == 0 14909Debug.Assert(!Rows[dataGridViewCell.RowIndex].ReadOnly); 15040int totalVisibleHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible); 15041int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 15382forceCurrentCellSelection: Rows.GetRowCount(DataGridViewElementStates.Visible) == 1); 15485if (Rows.Count > 0) 15497_ = Rows[NewRowIndex]; 15504for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 15506DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 15525for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 15527DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 15748_ = Rows[_ptCurrentCell.Y]; 15807_ = Rows[_ptCurrentCell.Y]; 15841_ = Rows[_ptCurrentCell.Y]; 15962if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15983if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15994if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16051if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16101if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16113if (rowIndex < Rows.Count) 16123Debug.Assert(Rows[rowIndex].Resizable == DataGridViewTriState.True); 16225&& _ptMouseEnteredCell.Y >= -1 && _ptMouseEnteredCell.Y < Rows.Count) 16447if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16646int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 16648&& _vertScrollBar.Value + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) 16654Debug.Assert(totalVisibleFrozenHeight == Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 16659if (_vertScrollBar.Value + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) 16926&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 17169Rows.ClearInternal(recreateNewRow: false); 17175for (int rowIndex = 0; rowIndex < Rows.Count; rowIndex++) 17177DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 17302Debug.Assert(rowIndexDeleted >= 0 && rowIndexDeleted < Rows.Count); 17304if (rowIndexDeleted >= 0 && rowIndexDeleted < Rows.Count) 17306foreach (DataGridViewCell cell in Rows[rowIndexDeleted].Cells) 17321int rowIndexPrevious = Rows.GetPreviousRow(rowIndexDeleted, DataGridViewElementStates.Visible); 17322int rowIndexNext = Rows.GetNextRow(rowIndexDeleted, DataGridViewElementStates.Visible); 17326Debug.Assert(NewRowIndex == Rows.Count - 1); 17327newY = rowIndexNext > -1 && rowIndexNext < Rows.Count - 1 ? rowIndexNext - 1 : rowIndexPrevious; 17600&& Rows.Count == 0 17625DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 17679if (!e.Handled && e.Button == MouseButtons.Left && e.RowIndex < Rows.Count) 17724if (rowIndex < Rows.Count && columnIndex < Columns.Count) 17733DataGridViewRowEventArgs dgvre = new(Rows[NewRowIndex]); 17765if (calledAddNewOnTheDataConnection && rowIndex > Rows.Count - 1) 17768rowIndex = Math.Min(rowIndex, Rows.Count - 1); 17790Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 17791dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 17845DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 17933rowDisplayed = (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 17951&& rowIndex == Rows.GetFirstRow(DataGridViewElementStates.Visible))) 18005if (isControlDown && ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)) 18073if (hti._row >= Rows.Count) 18075int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 18100else if ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Visible) == 0) 18113&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18178else if ((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) == 0) 18181((Rows.GetRowState(hti._row) & DataGridViewElementStates.Selected) != 0)); 18385if (rowIndex < Rows.Count && columnIndex < Columns.Count) 18397Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 18398dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 18485SelectRowRange(Rows.GetNextRow(_trackRowEdge, DataGridViewElementStates.Visible), 18491SelectRowRange(Rows.GetNextRow(hti._row, DataGridViewElementStates.Visible), 18497SelectRowRange(Rows.GetNextRow(_trackRow, DataGridViewElementStates.Visible), 18504Rows.GetPreviousRow(_trackRowEdge, DataGridViewElementStates.Visible), 18511Rows.GetPreviousRow(hti._row, DataGridViewElementStates.Visible), 18518Rows.GetPreviousRow(_trackRow, DataGridViewElementStates.Visible), 18524SelectRowRange(Rows.GetNextRow(_trackRow, DataGridViewElementStates.Visible), 18527Rows.GetPreviousRow(_trackRow, DataGridViewElementStates.Visible), 18534Rows.GetPreviousRow(_trackRow, DataGridViewElementStates.Visible), 18536SelectRowRange(Rows.GetNextRow(_trackRow, DataGridViewElementStates.Visible), 18627newState = Rows.GetRowState(rowIndex); 18670Rows.SetRowState(rowIndex, DataGridViewElementStates.Displayed, false); 18681bool rowDisplayed = (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 18707dataGridViewRow = Rows[rowIndex]; 18721if (rowVisible && Rows.GetRowCount(DataGridViewElementStates.Visible) > 1) 18797if (dataGridViewCell is not null && rowIndex < Rows.Count && columnIndex < Columns.Count) 18799dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 18844Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 18845dataGridViewCell = Rows.SharedRow(rowIndex).Cells[columnIndex]; 18923int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 18929rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 19148int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19197rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19201if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 19217Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 19218rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19228Debug.Assert((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Visible) != 0); 19234if ((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 19250Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 19251rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 19272int visibleRowsHeight = Rows.GetRowsHeight(DataGridViewElementStates.Displayed); 19561if (Columns.Count > 0 || Rows.Count > 0) 19628indexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19642int rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19643Rows.SharedRow(indexTmp).CachedThickness = rowHeight; 19647rowBounds.Height = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19655indexTmpNext = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19659dataGridViewRow = Rows.SharedRow(indexTmp); 19664Rows.GetRowState(indexTmp), 19683Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 19684Debug.Assert((Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0); 19698int rowHeight = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19699Rows.SharedRow(indexTmp).CachedThickness = rowHeight; 19703rowBounds.Height = Rows.SharedRow(indexTmp).GetHeight(indexTmp); 19711indexTmpNext = Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 19715dataGridViewRow = Rows.SharedRow(indexTmp); 19720Rows.GetRowState(indexTmp), 19834DataGridViewRow newRow = Rows.SharedRow(NewRowIndex); 19840newRow = Rows[NewRowIndex]; // un-share the 'new row'. 19886Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19900if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19902int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 20011if (rowIndex == NewRowIndex || rowIndex >= Rows.Count) 20017DataGridViewRowCancelEventArgs dgvrce = new(Rows[rowIndex]); 20021DataGridViewRow dataGridViewRow = Rows[rowIndex]; 20024int dataGridRowsCount = Rows.Count; 20074if (dataGridRowsCount != Rows.Count) 20087Rows.RemoveAtInternal(rowIndex, force: false); 20214int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 20224nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20763if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20800if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20852if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20912if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21010if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21137int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 21138int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 21220&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21241&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21258&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21612int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 21694&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21715&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21732&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22146int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 23003nextScreenVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 23014if ((Rows.GetRowState(nextScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 23018int firstDisplayedScrollingRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 23026jumpRows = Rows.GetRowCount(DataGridViewElementStates.Visible, 23047nextScreenVisibleRowIndexTmp = Rows.GetNextRow(nextScreenVisibleRowIndex, DataGridViewElementStates.Visible); 23185if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23212if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23264previousScreenVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 23275int jumpRows = (Rows.GetRowState(previousScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0 23288previousScreenVisibleRowIndexTmp = Rows.GetPreviousRow(previousScreenVisibleRowIndex, DataGridViewElementStates.Visible); 23297if ((Rows.GetRowState(previousScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 23300int firstDisplayedScrollingRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 23310previousScreenVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 23443if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23470if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23525int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 24387if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24605int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 24614previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 25037if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25069if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25110if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25158if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25240if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25406Debug.Assert(NewRowIndex == Rows.Count - 1); 25407Rows.RemoveAtInternal(NewRowIndex, force: false); 25436dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25461dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25480Rows.ClearInternal(recreateNewRow: false); 25601Rows.ClearInternal(recreateNewRow: true); 25625Rows.AddInternal(RowTemplateClone); 25629Rows.AddCopiesInternal(0, rowsCount - 1); 25678foreach (DataGridViewRow row in Rows) 25996for (int rowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 25998rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 26000DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 26019DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 26028Debug.Assert(rowIndex < Rows.Count); 26030DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 26275Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 26276Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= -1 && DisplayedBandsInfo.FirstDisplayedScrollingRow < Rows.Count); 26278Debug.Assert((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 26335Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 26337if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0) 26350rowsToScroll = Rows.GetRowCount(DataGridViewElementStates.Visible, rowIndex, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26357int yRowBottomEdge = GetRowYFromIndex(rowIndex) + Rows.SharedRow(rowIndex).GetHeight(rowIndex); 26360yRowBottomEdge -= Rows.SharedRow(firstDisplayedScrollingRow).GetHeight(firstDisplayedScrollingRow); 26364firstDisplayedScrollingRow = Rows.GetNextRow(firstDisplayedScrollingRow, DataGridViewElementStates.Visible); 26392Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingRow >= Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 26400int frozenRowsThickness = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 26423if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26451int firstVisibleScrollingRow = Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 26453int newScrolledOffRowCount = Rows.GetRowCount(DataGridViewElementStates.Visible, firstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26472deltaY -= Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26473newFirstVisibleScrollingRow = Rows.GetNextRow( 26490deltaY = -Rows.GetRowsHeight(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26491rows = Rows.GetRowCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26504newFirstVisibleScrollingRow = Rows.GetPreviousRow( 26510deltaY += Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26538deltaY = Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26541newFirstVisibleScrollingRow = Rows.GetNextRow(newFirstVisibleScrollingRow, DataGridViewElementStates.Visible); 26548deltaY += Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26554newFirstVisibleScrollingRow = Rows.GetPreviousRow( 26559deltaY = -Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26562int scrollingRowTmp = Rows.GetPreviousRow(newFirstVisibleScrollingRow, 26567deltaY -= Rows.SharedRow(scrollingRowTmp).GetHeight(scrollingRowTmp); 26589scrollHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26590rowCount = Rows.GetRowCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, DisplayedBandsInfo.FirstDisplayedScrollingRow); 26595scrollHeight = -Rows.GetRowsHeight(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, oldFirstVisibleScrollingRow); 26596rowCount = -Rows.GetRowCount(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingRow, oldFirstVisibleScrollingRow); 26626int rowIndex = 0, maxRowIndex = Rows.Count; 26630_ = Rows[rowIndex]; 26647int rowIndex = 0, maxRowIndex = Rows.Count; 26650DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 26690int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 26731if (index >= Rows.Count) 26733index -= Rows.Count; 26739return Rows.SharedRow(index).Cells[columnIndex]; 26766return Rows.SharedRow(rowIndex).Cells[index]; 26818ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 26836&& !IsSharedCellVisible(Rows.SharedRow(rowIndex).Cells[columnIndex], rowIndex)) 26854Debug.Assert(rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count); 26898currentCell = Rows.SharedRow(oldCurrentCellY).Cells[oldCurrentCellX]; 26902currentCell = Rows[oldCurrentCellY].Cells[oldCurrentCellX]; 26982if (rowIndex >= Rows.Count) 27013currentCell = Rows[rowIndex].Cells[columnIndex]; 27021if (oldCurrentCellX < Columns.Count && oldCurrentCellY < Rows.Count) 27026if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 27111currentCell = Rows.SharedRow(oldCurrentCellY).Cells[oldCurrentCellX]; 27115currentCell = Rows[oldCurrentCellY].Cells[oldCurrentCellX]; 27185if (oldCurrentCellX < Columns.Count && oldCurrentCellY < Rows.Count) 27190if (RowHeadersVisible && oldCurrentCellY < Rows.Count) 27408if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 27541Debug.Assert(columnIndex >= 0 && rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count); 27544DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 27545DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 27548DataGridViewCell dataGridViewCell = Rows[rowIndex].Cells[columnIndex]; 27572dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27577for (int row = rowIndex + 1; row < Rows.Count; row++) 27579dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27587Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, false); 27590dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27597dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27650Debug.Assert(rowIndex >= 0 && rowIndex < Rows.Count); 27652DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 27670Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, true); 27675Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, false); 27691ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 27694DataGridViewRow dataGridViewRow = Rows.SharedRow(rowIndex); 27695DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 27698DataGridViewCell dataGridViewCell = Rows[rowIndex].Cells[columnIndex]; 27721if (Rows.Count > BulkPaintThreshold) 27735dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27740for (int row = rowIndex + 1; row < Rows.Count; row++) 27742dataGridViewCellTmp = Rows[row].Cells[columnIndex]; 27767Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, false); 27770dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27777dataGridViewCellTmp = Rows[rowIndex].Cells[column]; 27805if (!Columns[columnIndex].Visible || (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 27940if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 27943((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 27949if ((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0) 27952((Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 28137ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28142DataGridViewElementStates rowState = Rows.GetRowState(rowIndex); 28153Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, true); 28160Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, false); 28311int visibleFrozenRows = Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28314int rowVFIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28316Rows.SetRowState(rowVFIndex, DataGridViewElementStates.Frozen, false); 28317Debug.Assert(Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) == 0); 28350Rows.Sort(comparer!, direction == ListSortDirection.Ascending); 28378int rowVIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 28382rowVIndex = Rows.GetNextRow(rowVIndex, DataGridViewElementStates.Visible); 28387Rows.SetRowState(rowVIndex, DataGridViewElementStates.Frozen, true); 28495int totalVisibleFrozenHeight = Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28502if (_vertScrollBar.Value + Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow) <= 28526int firstDisplayedScrollingRowHeight = Rows.SharedRow(DisplayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(DisplayedBandsInfo.FirstDisplayedScrollingRow); 28562int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 28583nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28723int firstVisibleRowIndex = Rows.GetFirstRow(DataGridViewElementStates.Visible); 28744previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28752int lastVisibleRowIndex = Rows.GetLastRow(DataGridViewElementStates.Visible); 28933ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 28947ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 29002ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 29013ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexStart, Rows.Count); 29016ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndexEnd, Rows.Count); 29046ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, Rows.Count); 29048Rows.InvalidateCachedRowsHeights(); 29050bool rowVisible = (rowIndex >= 0 && (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 29089rowIndex = Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 29185rowIndexTmp = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 29189if (((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) == displayed) 29191Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, displayed); 29194rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 29208if (((Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) == displayed) 29210Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, displayed); 29213rowIndexTmp = Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 29240&& _ptMouseEnteredCell.Y < Rows.Count) 29267&& _ptMouseEnteredCell.Y < Rows.Count) 29368Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29378Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29393Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29403Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29422Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29445Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29484Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29508Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29529Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29565Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29621Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29634Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29668Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29684Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29711Rows.GetNextRow(anchorRowIndex, DataGridViewElementStates.Visible), 29765Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29781Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29815Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29831Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29858Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29879Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29888Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29905Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29914Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 30050dataGridViewCell = Rows.SharedRow(hti._row).Cells[hti._col]; 30058dataGridViewCell = 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 (27)
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); 1729ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1799ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1805if (DataGridView.Rows.SharedRow(rowIndex) != OwningRow) 1810DataGridViewElementStates rowEffectiveState = DataGridView.Rows.GetRowState(rowIndex); 1879ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, DataGridView.Rows.Count); 1913if (DataGridView.Rows.SharedRow(rowIndex).HasDefaultCellStyle) 1915rowStyle = DataGridView.Rows.SharedRow(rowIndex).DefaultCellStyle; 2417ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(rowIndex, dataGridView.Rows.Count); 3046if (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)
763rowIndex < 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;