977 references to Rows
System.Windows.Forms (949)
winforms\Managed\System\WinForms\DataGridView.cs (44)
2186Debug.Assert(this.ptCurrentCell.Y < this.Rows.Count); 2187DataGridViewRow dataGridViewRow = (DataGridViewRow) this.Rows[this.ptCurrentCell.Y]; // unsharing row 2211(this.Rows.GetRowState(value.RowIndex) & DataGridViewElementStates.Visible) == 0) 2250Debug.Assert(this.ptCurrentCell.Y >= 0 && this.ptCurrentCell.Y < this.Rows.Count); 2251DataGridViewRow dataGridViewRow = this.Rows.SharedRow(this.ptCurrentCell.Y); 2270bool previousVisibleRowExists = (-1 != this.Rows.GetPreviousRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible)); 2288bool nextVisibleRowExists = (-1 != this.Rows.GetNextRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible)); 2325Debug.Assert(this.ptCurrentCell.Y < this.Rows.Count); 2327return this.Rows[this.ptCurrentCell.Y]; 2909return this.Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // unshares the row of first displayed cell 2928firstDisplayedCell.RowIndex < this.Rows.Count && 2939if (!this.Rows[firstDisplayedCell.RowIndex].Frozen) 2958ptFirstDisplayedCellAddress.Y = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 3039int firstDisplayedRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 3042if ((this.Rows.GetRowState(firstDisplayedRowIndex) & DataGridViewElementStates.Frozen) == 0 && 3170if (value < 0 || value >= this.Rows.Count) 3174if ((this.Rows.GetRowState(value) & DataGridViewElementStates.Visible) == 0) 3178if ((this.Rows.GetRowState(value) & DataGridViewElementStates.Frozen) != 0) 3194int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 3223int rowsToScroll = this.Rows.GetRowCount(DataGridViewElementStates.Visible, this.displayedBandsInfo.FirstDisplayedScrollingRow, value); 3731DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 3742DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 3752DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 3951int rowCount = this.Rows.Count; 4042return this.Rows.Count; 4064if (value != this.Rows.Count) 4069this.Rows.Clear(); 4071else if (value < this.Rows.Count) 4074while (value < this.Rows.Count) 4076int currentRowCount = this.Rows.Count; 4077this.Rows.RemoveAt(currentRowCount - (this.AllowUserToAddRowsInternal ? 2 : 1)); 4078if (this.Rows.Count >= currentRowCount) 4094int rowsToAdd = value - this.Rows.Count; 4097this.Rows.Add(rowsToAdd); 4581int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 4632foreach (DataGridViewRow dataGridViewRow in this.Rows) // unshares all rows! 4648DataGridViewRow dataGridViewRow = (DataGridViewRow) this.Rows[rowIndex]; // unshares the selected row 4718strc.Add((DataGridViewRow) this.Rows[rowIndex]); // unshares the selected row 5090DataGridViewRow row = this.Rows[rowIndex]; 5095DataGridViewRow row = this.Rows[rowIndex]; 5110DataGridViewRow row = this.Rows[rowIndex]; 5115DataGridViewRow row = this.Rows[rowIndex]; 5201int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 5292return -1 != this.Rows.GetFirstRow(DataGridViewElementStates.Visible);
winforms\Managed\System\WinForms\DataGridViewAccessibleObject.cs (12)
114if (index < this.owner.Rows.GetRowCount(DataGridViewElementStates.Visible)) 116int actualRowIndex = this.owner.Rows.DisplayIndexToRowIndex(index); 117return this.owner.Rows[actualRowIndex].AccessibilityObject; 120index -= this.owner.Rows.GetRowCount(DataGridViewElementStates.Visible); 153int childCount = this.owner.Rows.GetRowCount(DataGridViewElementStates.Visible); 202return this.owner.Rows[hti.RowIndex].Cells[hti.ColumnIndex].AccessibilityObject; 216return this.owner.Rows[hti.RowIndex].AccessibilityObject; 359UnsafeNativeMethods.IRawElementProviderSimple[] result = new UnsafeNativeMethods.IRawElementProviderSimple[this.owner.Rows.Count]; 360for (int i = 0; i < this.owner.Rows.Count; i++) 362result[i] = this.owner.Rows[i].HeaderCell.AccessibilityObject; 395if (row >= 0 && row < this.owner.Rows.Count && 398return this.owner.Rows[row].Cells[column].AccessibilityObject;
winforms\Managed\System\WinForms\DataGridViewBand.cs (2)
981this.DataGridView.Rows.InvalidateCachedRowCount(elementState); 982this.DataGridView.Rows.InvalidateCachedRowsHeight(elementState);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (1)
535rowIndex < this.DataGridView.Rows.Count)
winforms\Managed\System\WinForms\DataGridViewButtonColumn.cs (3)
99DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 141DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 183DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows;
winforms\Managed\System\WinForms\DataGridViewCell.cs (30)
236Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 401Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 590Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 666Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 714Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 977Debug.Assert(this.DataGridView.Rows.GetRowState(this.RowIndex) == this.DataGridView.Rows.SharedRow(this.RowIndex).State); 1205DataGridViewElementStates rowState = this.DataGridView.Rows.GetRowState(rowIndex); 1231rowIndex == this.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible) /*isLastVisibleRow*/); 1567if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 2017if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 2086if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 2095if (this.DataGridView.Rows.SharedRow(rowIndex) != this.owningRow) 2100DataGridViewElementStates rowEffectiveState = this.DataGridView.Rows.GetRowState(rowIndex); 2160if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 2195if (this.DataGridView.Rows.SharedRow(rowIndex).HasDefaultCellStyle) 2197rowStyle = this.DataGridView.Rows.SharedRow(rowIndex).DefaultCellStyle; 2670if (rowIndex < 0 || rowIndex >= dataGridView.Rows.Count) 3466if (this.DataGridView != null && e.ColumnIndex < this.DataGridView.Columns.Count && e.RowIndex < this.DataGridView.Rows.Count) 5271if (this.owner.OwningRow.Index == this.owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 5285int previousVisibleRow = this.owner.DataGridView.Rows.GetPreviousRow(this.owner.OwningRow.Index, DataGridViewElementStates.Visible); 5286return this.owner.DataGridView.Rows[previousVisibleRow].Cells[this.owner.OwningColumn.Index].AccessibilityObject; 5289if (this.owner.OwningRow.Index == this.owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 5295int nextVisibleRow = this.owner.DataGridView.Rows.GetNextRow(this.owner.OwningRow.Index, DataGridViewElementStates.Visible); 5296return this.owner.DataGridView.Rows[nextVisibleRow].Cells[this.owner.OwningColumn.Index].AccessibilityObject;
winforms\Managed\System\WinForms\DataGridViewCellPaintingEventArgs.cs (3)
192if (this.rowIndex < -1 || this.rowIndex >= this.dataGridView.Rows.Count) 216if (this.rowIndex < -1 || this.rowIndex >= this.dataGridView.Rows.Count) 245if (this.rowIndex < -1 || this.rowIndex >= this.dataGridView.Rows.Count)
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (3)
966rowIndex < this.DataGridView.Rows.Count) 1085Debug.Assert((position.Y >= 0) && (position.Y < this.DataGridView.Rows.Count)); 1087int visibleRowIndex = this.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, position.Y);
winforms\Managed\System\WinForms\DataGridViewCheckBoxColumn.cs (5)
117DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 157DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 198DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 241DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 295DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows;
winforms\Managed\System\WinForms\DataGridViewColumn.cs (8)
1262for (rowIndex = dataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible); 1264rowIndex = dataGridView.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1266dataGridViewRow = dataGridView.Rows.SharedRow(rowIndex); 1286rowIndex = dataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 1289dataGridViewRow = dataGridView.Rows.SharedRow(rowIndex); 1303rowIndex = dataGridView.Rows.GetNextRow(rowIndex, 1312dataGridViewRow = dataGridView.Rows.SharedRow(rowIndex); 1326rowIndex = dataGridView.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible);
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (1)
2008DataGridViewElementStates rowState = this.DataGridView.Rows.GetRowState(rowIndex);
winforms\Managed\System\WinForms\DataGridViewComboBoxColumn.cs (11)
56DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 133DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 176DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 217DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 259DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 299DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 338DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 401DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 440DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 479DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 525DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows;
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (13)
590this.currencyManager.List.Count == (this.owner.AllowUserToAddRowsInternal ? this.owner.Rows.Count - 1 : this.owner.Rows.Count)) 685if (this.owner.NewRowIndex == -1 || e.NewIndex != this.owner.Rows.Count) 687this.owner.Rows.InsertInternal(e.NewIndex, this.owner.RowTemplateClone, true /*force*/); 698this.owner.Rows.RemoveAtInternal(e.NewIndex, true /*force*/); 747if (this.owner.Rows.Count > 0 && 773if (this.owner.Rows.Count == (owner.AllowUserToAddRowsInternal ? 1 : 0)) 849int result = this.owner.Rows.Count; 850if (this.owner.AllowUserToAddRowsInternal && this.owner.Rows.Count > 0) 1346else if (rowIndex < this.owner.Rows.Count) 1357if ((this.owner.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 1360this.owner.Rows[rowIndex].Visible = true; 1370(columnIndex < this.owner.Columns.Count && rowIndex < this.owner.Rows.Count &&
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (4)
334(this.DataGridView != null && (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count))) 338if (this.DataGridView != null && this.DataGridView.Rows.SharedRow(rowIndex) != this.OwningRow) 459if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 463if (this.DataGridView.Rows.SharedRow(rowIndex) != this.OwningRow)
winforms\Managed\System\WinForms\DataGridViewImageColumn.cs (3)
116DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 210DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 249DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows;
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (1)
839rowIndex < this.DataGridView.Rows.Count)
winforms\Managed\System\WinForms\DataGridViewLinkColumn.cs (7)
51DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 122DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 161DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 213DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 255DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 295DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows; 334DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (746)
43if (cellAddress.Y < 0 || cellAddress.Y >= this.Rows.Count) 48int visibleRowIndex = this.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, cellAddress.Y); 85this.Rows.AddInternal(true /*newRow*/, null /*values*/); 86this.newRowIndex = this.Rows.Count - 1; 91DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs(this.Rows[this.newRowIndex]); 317Debug.Assert(rowIndex < this.Rows.Count); 331DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 378Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 389dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 399dataGridViewCell = this.Rows.SharedRow(rowIndex).HeaderCell; 417this.Rows.SharedRow(rowIndex).GetHeightInfo(rowIndex, out height, out minimumHeight); 430this.Rows[rowIndex].Thickness = preferredThickness; // unsharing the resized row 459for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 461rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 467dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 477dataGridViewCell = this.Rows.SharedRow(rowIndex).HeaderCell; 494if (this.Rows.SharedRow(rowIndex).Height < preferredHeight) 496this.Rows[rowIndex].Height = preferredHeight; // unsharing the row to be resized 511int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 515rowIndex = this.Rows.GetNextRow(rowIndex, 525rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 937int totalVisibleRowCount = this.Rows.GetRowCount(DataGridViewElementStates.Visible); 938int totalVisibleHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible); 939int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 944if (this.displayedBandsInfo.NumTotallyDisplayedFrozenRows == this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 945this.displayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 1293for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 1295rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1311int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 1315cy += this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1316rowIndex = this.Rows.GetNextRow(rowIndex, 1330cy += this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1331rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 1339int rowAboveFirstVisibleScrollingRow = this.Rows.GetPreviousRow(this.displayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 1350cy += this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 1351rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 1370if (this.Columns.Count == 0 && this.Rows.Count == 0) 1375(this.Rows.GetFirstRow(DataGridViewElementStates.Visible) == -1 || 1387allCellsSelected = this.individualSelectedCells.Count == this.Columns.Count * this.Rows.Count; 1394for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 1396rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1398dataGridViewRow = this.Rows[rowIndex]; // unshares this row 1418allCellsSelected = this.selectedBandIndexes.Count * this.Rows.Count + this.individualSelectedCells.Count == this.Columns.Count * this.Rows.Count; 1430for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 1432rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1434dataGridViewRow = this.Rows[rowIndex]; // unshares this row 1451allCellsSelected = this.selectedBandIndexes.Count * this.Columns.Count + this.individualSelectedCells.Count == this.Columns.Count * this.Rows.Count; 1458for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 1460rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 1463((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 1464if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 1466dataGridViewRow = this.Rows[rowIndex]; // unshares this row 1952if (rowIndex < 0 || rowIndex >= this.Rows.Count) 2029rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 2034preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, this.Rows.SharedRow(rowIndex).GetHeight(rowIndex))); 2038preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2046rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2049DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 2060rowIndex = this.Rows.GetNextRow(rowIndex, 2068DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 2079rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 2086for (rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 2088rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 2092preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, this.Rows.SharedRow(rowIndex).GetHeight(rowIndex))); 2096preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2138if (rowIndex < -1 || rowIndex >= this.Rows.Count) 2158rowIndex != this.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 2165DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 2202rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 2207preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, this.Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))); 2211preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2219rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2222DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndexTmp); 2233rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, 2241DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndexTmp); 2252rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 2259for (rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 2261rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible)) 2265preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, this.Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))); 2269preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2298Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 2315DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 2333this.Rows[rowIndex].ThicknessInternal = preferredThickness; // unsharing the resized row 2340this.Rows[rowIndex].ThicknessInternal = preferredThickness; // unsharing the resized row 2344this.Rows[rowIndex].Thickness = preferredThickness; // unsharing the resized row 2435int rowIndex = this.Rows.GetNextRow(rowIndexStart - 1, DataGridViewElementStates.Visible); 2443rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 2616Debug.Assert(this.ptCurrentCell.Y >= 0 && this.ptCurrentCell.Y < this.Rows.Count); 2810clip.Y = topEdge + this.Rows.SharedRow(index).GetMinimumHeight(index) - mouseBarOffset - 1; 3165Debug.Assert((this.AllowUserToAddRowsInternal && this.Rows.Count == 1) || 3166(!this.AllowUserToAddRowsInternal && this.Rows.Count == 0)); 3167if (this.Rows.Count > 0) 3171int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 3254Debug.Assert(0 == this.Rows.GetFirstRow(DataGridViewElementStates.Visible)); 3531if (rowIndexException < 0 || rowIndexException >= this.Rows.Count) 3541if (rowIndexException < -1 || rowIndexException >= this.Rows.Count) 4135if (rowIndex >= this.Rows.Count) 4141int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 4152if (rowIndex > -1 && (this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 4246int indexTmp = this.Rows.Count; 4257DataGridViewElementStates rowState = this.Rows.GetRowState(indexTmp); 4264indexTmp = this.Rows.GetPreviousRow(indexTmp, 4271rowHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 4281indexTmp = this.Rows.GetPreviousRow(indexTmp, 4286rowHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 4299int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 4305height += this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 4306rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 4317int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 4318return this.Rows.GetRowsHeight(DataGridViewElementStates.Visible, this.displayedBandsInfo.FirstDisplayedScrollingRow, lastVisibleRowIndex) + 4319this.Rows.SharedRow(lastVisibleRowIndex).GetHeight(lastVisibleRowIndex); 4505int totalVisibleHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible); 4506int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 4753int nRows = this.Rows.Count; 4774DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 4782cy += this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 4822(this.Rows.GetRowState(firstDisplayedScrollingRow) & DataGridViewElementStates.Frozen) != 0 || 4823(this.Rows.GetRowState(firstDisplayedScrollingRow) & DataGridViewElementStates.Visible) == 0 4832if ((this.Rows.GetRowState(i) & DataGridViewElementStates.Visible) != 0) 4834cy += this.Rows.SharedRow(i).GetHeight(i); 4848if ((this.Rows.GetRowState(i) & (DataGridViewElementStates.Frozen | DataGridViewElementStates.Visible)) == DataGridViewElementStates.Visible) 4850int height = this.Rows.SharedRow(i).GetHeight(i); 5226Debug.Assert(anticipatedRowIndex >= 0 && anticipatedRowIndex <= this.Rows.Count); 5228int previousRowIndex = this.Rows.GetPreviousRow(anticipatedRowIndex, 5232(this.Rows.GetRowState(previousRowIndex) & DataGridViewElementStates.Frozen) == 0 && 5239int nextRowIndex = this.Rows.GetNextRow((previousRowIndex == -1) ? anticipatedRowIndex - 1 : previousRowIndex, 5243(this.Rows.GetRowState(nextRowIndex) & DataGridViewElementStates.Frozen) != 0 && 5256int rowIndexTmp = this.Rows.GetPreviousRow(rowIndexInserted, DataGridViewElementStates.Visible); 5259previousRowFrozen = (this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen; 5263rowIndexTmp = this.Rows.GetNextRow(rowIndexInserted - 1, DataGridViewElementStates.Visible); 5267nextRowFrozen = (this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen; 5292if (((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) != 0 && !frozenStateChanging) || 5293((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0 && frozenStateChanging)) 5296rowIndexTmp = this.Rows.GetPreviousRow(rowIndex, 5300int dataGridViewRowFirst = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 5308this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Frozen, true); 5309rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, 5317rowIndexTmp = this.Rows.GetNextRow(rowIndex, 5325rowIndexTmp = this.Rows.GetNextRow(dataGridViewRowLast, 5340this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Frozen, false); 5341rowIndexTmp = this.Rows.GetPreviousRow(rowIndexTmp, 5350int rowsCount = this.Rows.Count; 5353DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 5376int rowsCount = this.Rows.Count; 5379DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 5464Debug.Assert(this.Rows.Count > 1); 5467DataGridViewRowCancelEventArgs dgvrce = new DataGridViewRowCancelEventArgs(this.Rows[this.newRowIndex]); 5475Debug.Assert(this.newRowIndex == this.Rows.Count - 1); 5476DataGridViewRow dataGridViewRow = this.Rows[this.newRowIndex]; 5477this.Rows.RemoveAtInternal(this.newRowIndex, false /*force*/); 5486this.newRowIndex = this.Rows.Count - 1; 5487Debug.Assert((this.Rows.GetRowState(this.newRowIndex) & DataGridViewElementStates.Visible) != 0); 5490OnDefaultValuesNeeded(new DataGridViewRowEventArgs(this.Rows[this.newRowIndex])); 5857dgvcme.RowIndex < this.Rows.Count) 5868dgvcme.RowIndex < this.Rows.Count) 5880if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 5920dgvcme.RowIndex < this.Rows.Count) 5929dgvcme.RowIndex < this.Rows.Count) 5937dgvcme.RowIndex < this.Rows.Count) 5945dgvcme.RowIndex < this.Rows.Count) 5953dgvcme.RowIndex < this.Rows.Count) 6353DataGridViewRow dataGridViewRow = this.Rows.SharedRow(this.trackRow); 6366dataGridViewRow = this.Rows[this.trackRow]; // Unsharing row 6417Debug.Assert(rowIndex < this.Rows.Count); 6418Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 6419Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0); 6427int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6459if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6461this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 6463rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6471rowIndexTmp = this.Rows.GetPreviousRow(this.displayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6472while (rowIndexTmp != -1 && (this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6474this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6475rowIndexTmp = this.Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6484rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6486while (rowIndexTmp != -1 && (this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6488this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6489rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6494rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6498if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6500this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 6502rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6507while (rowIndexTmp != -1 && (this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6509this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6510rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6519int firstDisplayedFrozenRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6523lastDisplayedFrozenRowIndex = this.Rows.GetNextRow(firstDisplayedFrozenRowIndex, DataGridViewElementStates.Visible, this.displayedBandsInfo.NumDisplayedFrozenRows-2 /*skipRows*/); 6535lastDisplayedScrollingRowIndex = this.Rows.GetNextRow(this.displayedBandsInfo.FirstDisplayedScrollingRow, DataGridViewElementStates.Visible, this.displayedBandsInfo.NumDisplayedScrollingRows - 2 /*skipRows*/); 6548if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6554this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6555rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6561rowIndexTmp < this.Rows.Count && 6567if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) 6573this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6574rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 6585rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible, this.displayedBandsInfo.OldNumDisplayedScrollingRows - 1); 6588rowIndexTmp = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 6595if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6597this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6599rowIndexTmp = this.Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible); 6605rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6608rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, this.displayedBandsInfo.OldNumDisplayedFrozenRows - 1); 6611rowIndexTmp = this.Rows.GetLastRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6618if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 6620this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, false); 6622rowIndexTmp = this.Rows.GetPreviousRow(rowIndexTmp, DataGridViewElementStates.Visible); 6643if (!this.ColumnHeadersVisible && this.Rows.GetRowCount(DataGridViewElementStates.Visible) == 0) 6937return cellCount + this.selectedBandIndexes.Count * this.Rows.Count; 6971for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 6973DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 6990DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 7007return this.Rows.Count * this.Columns.Count; 7016for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 7018DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 7019if (!visibleRequired || (this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0) 7043DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 7125if (rowIndex >= this.Rows.Count) 7182Debug.Assert(rowIndex >= -1 && rowIndex < this.Rows.Count); 7185DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 7235if (this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) == 0) 7242includeColumnHeaders = (this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Selected) == -1); 7371int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7373int nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7384cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7398cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7414cellContent = this.Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal(rowIndex, 7433cellContent = this.Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal(rowIndex, 7449cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7463cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7479nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7515int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 7643nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 7656cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7670cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7686cellContent = this.Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal(rowIndex, 7705cellContent = this.Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal(rowIndex, 7721cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7735cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 7751nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 7776selectedVisibleRowExists = this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) != 0; 7782selectedVisibleCellExists = selectedVisibleColumnExists && this.Rows.GetRowCount(DataGridViewElementStates.Visible) != 0; 7912if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0) 7929firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 7930int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 8097nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 8122cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 8138cellContent = this.Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal(rowIndex, 8155cellContent = this.Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal(rowIndex, 8182cellContent = this.Rows.SharedRow(rowIndex).Cells[dataGridViewColumn.Index].GetClipboardContentInternal(rowIndex, 8642int visibleRowsHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible); 8643int frozenVisibleRowsHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 8673(this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 && 8675(this.Rows.GetRowState(this.trackRowEdge) & DataGridViewElementStates.Frozen) != 0 && 8677(this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Frozen) == 0) 8681int firstUnfrozenRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 8708((this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 || 8709(this.trackRowEdge != -1 && (this.Rows.GetRowState(this.trackRowEdge) & DataGridViewElementStates.Frozen) == 0)) && 8734if (this.verticalOffset + this.Rows.SharedRow(this.displayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(this.displayedBandsInfo.FirstDisplayedScrollingRow) <= 8786firstRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 8888(this.ptAnchorCell.Y != -1 && (this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8890(this.ptCurrentCell.Y != -1 && (this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 8915if (this.verticalOffset + this.Rows.SharedRow(this.displayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(this.displayedBandsInfo.FirstDisplayedScrollingRow) <= 9095int preferredHeight = Math.Min(minimumHeight + this.Rows.GetRowsHeight(DataGridViewElementStates.Visible), proposedConstraints.Height); 9108if (rowIndex < 0 || rowIndex >= this.Rows.Count) 9117Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 9119if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) == 0) 9128for (indexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9142cy += this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9143indexTmp = this.Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9163cy += this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9164indexTmp = this.Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 9172if (cutOverflow && cy + this.Rows.SharedRow(indexTmp).GetHeight(indexTmp) > data.Bottom) 9178displayHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9213int indexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9216rowHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9223indexTmp = this.Rows.GetNextRow(indexTmp, 9231Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 && 9232(this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 9236rowHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9243indexTmp = this.Rows.GetNextRow(indexTmp, 9283Debug.Assert(index >= 0 && index < this.Rows.Count); 9284Debug.Assert((this.Rows.GetRowState(index) & DataGridViewElementStates.Visible) != 0); 9288int indexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 9295y += this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9296indexTmp = this.Rows.GetNextRow(indexTmp, 9318indexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 9324Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0 && 9325(this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 9333y += this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9334indexTmp = this.Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 9341indexTmp = this.Rows.GetPreviousRow(this.displayedBandsInfo.FirstDisplayedScrollingRow, 9346y -= this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 9351indexTmp = this.Rows.GetPreviousRow(indexTmp, 9563int rowHeight = this.Rows.SharedRow(hti.row).GetHeight(hti.row); 9580indexTmp = this.Rows.GetPreviousRow(hti.row, DataGridViewElementStates.Visible); 9726int rowHeight = this.Rows.SharedRow(hti.row).GetHeight(hti.row); 9740indexTmp = this.Rows.GetPreviousRow(hti.row, 9764int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 9854dataGridViewCell = this.Rows[this.ptCurrentCell.Y].Cells[this.ptCurrentCell.X]; // unshare the edited cell 9959if (rowIndex < -1 || rowIndex >= this.Rows.Count) 10030if (rowIndex < 0 || rowIndex >= this.Rows.Count) 10039Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 10053this.Rows.InvalidateCachedRowsHeights(); 10064Debug.Assert(lo < this.Rows.Count); 10065Debug.Assert(hi < this.Rows.Count); 10067if (this.Rows.GetRowCount(DataGridViewElementStates.Visible) == 0) 10078if ((this.Rows.GetRowState(lo) & DataGridViewElementStates.Visible) == 0) 10080lo = this.Rows.GetNextRow(lo, DataGridViewElementStates.Visible); 10090if ((this.Rows.GetRowState(hi) & DataGridViewElementStates.Visible) == 0) 10092hi = this.Rows.GetPreviousRow(hi, DataGridViewElementStates.Visible); 10103if ((this.Rows.GetRowState(lo) & DataGridViewElementStates.Frozen) != 0) 10115this.Rows.GetRowCount(DataGridViewElementStates.Visible, 10139if ((this.Rows.GetRowState(hi) & DataGridViewElementStates.Frozen) == DataGridViewElementStates.Frozen) 10151else if (this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) == 0) 10166if ((this.Rows.GetRowState(i) & DataGridViewElementStates.Visible) == 0) 10218return columnIndex >= this.Columns.Count || rowIndex >= this.Rows.Count || columnIndex == -1 || rowIndex == -1; 10223return rowIndex >= this.Rows.Count || rowIndex == -1; 10337int totalVisibleRowCount = this.Rows.GetRowCount(DataGridViewElementStates.Visible); 10342int totalVisibleHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible); 10343int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 10362if (this.displayedBandsInfo.NumTotallyDisplayedFrozenRows == this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 10363this.displayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 10390this.displayedBandsInfo.NumTotallyDisplayedFrozenRows == this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 10391this.displayedBandsInfo.NumTotallyDisplayedScrollingRows != totalVisibleRowCount - this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 10442if (this.displayedBandsInfo.NumTotallyDisplayedFrozenRows == this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) && 10572firstDisplayedCellAddress.Y != this.Rows.Count - 1)) 10694Debug.Assert(this.ptCurrentCell.Y >= 0 && this.ptCurrentCell.Y < this.Rows.Count); 10765Debug.Assert(rowIndex == this.Rows.Count - 1); 10769DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 10784DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 10799DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 10813int rowHeight = this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 10814this.Rows.SharedRow(rowIndex).CachedThickness = rowHeight; 10826if (this.Rows.GetRowCount(DataGridViewElementStates.Visible) > 1) 10942if (this.Rows.Count > 0) 10953DataGridViewRow newRow = this.Rows[this.newRowIndex]; 10960for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 10962DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 10979for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 10981DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 11019if (this.Rows.Count > 0 && dataGridViewColumn.CellType == null) 11080if (this.Rows.Count > 0) 11088DataGridViewRow newRow = this.Rows[this.newRowIndex]; 11102for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 11104DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 11122for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 11124DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 11151CorrectRowFrozenState(dataGridViewRow, rowState, this.Rows.Count); 11217CorrectRowFrozenStates(dataGridViewRows, this.Rows.Count /*rowIndexInserted*/); 11518for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 11520rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 11523int rowHeight = this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 11524this.Rows.SharedRow(rowIndex).CachedThickness = rowHeight; 11728if (e.RowIndex >= this.Rows.Count) 11765if (e.RowIndex >= this.Rows.Count) 11773DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 11810rowDisplayed = (this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 11851if (e.RowIndex >= this.Rows.Count) 11859DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 11887if (e.RowIndex >= this.Rows.Count) 11895DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 11924if (e.RowIndex >= this.Rows.Count) 11950if (e.RowIndex >= this.Rows.Count) 11969if (e.RowIndex >= this.Rows.Count) 11977DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 12000if (e.RowIndex >= this.Rows.Count) 12022Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 12023dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 12036if (e.RowIndex >= this.Rows.Count) 12073if (e.RowIndex >= this.Rows.Count) 12103if (e.RowIndex >= this.Rows.Count) 12133if (e.RowIndex >= this.Rows.Count) 12155Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 12156dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 12169if (e.RowIndex >= this.Rows.Count) 12198if (e.RowIndex >= this.Rows.Count) 12206DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 12230if (e.RowIndex >= this.Rows.Count) 12238DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 12262if (e.RowIndex >= this.Rows.Count) 12314DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 12475if (hti.row >= this.Rows.Count) 12477int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 12501IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.col], hti.row) && 12633(this.Columns[hti.col].Selected || IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.col], hti.row)) && 12728((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) != 0)) 12739this.ptAnchorCell.Y > -1 && (this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12792else if ((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) == 0) 12795((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) != 0)); 12812(((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) != 0) || 12813IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.col], hti.row)) && 12924if (e.RowIndex >= this.Rows.Count) 12935DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 12958if (e.RowIndex >= this.Rows.Count) 12969DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 12992if (e.RowIndex >= this.Rows.Count) 13000DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 13060if (e.RowIndex >= this.Rows.Count) 13068DataGridViewRow dataGridViewRow = this.Rows[e.RowIndex]; 13091if (e.RowIndex >= this.Rows.Count) 13120if (e.RowIndex >= this.Rows.Count) 13218if (e.RowIndex >= this.Rows.Count) 13404if (e.RowIndex >= this.Rows.Count) 13430if (e.RowIndex >= this.Rows.Count) 13452Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 13453dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 13466if (e.RowIndex >= this.Rows.Count) 13504Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 13505dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 13519if (e.RowIndex >= this.Rows.Count) 13557if (e.RowIndex >= this.Rows.Count) 13586if (e.RowIndex < 0 || e.RowIndex >= this.Rows.Count) 13617if (e.RowIndex < 0 || e.RowIndex >= this.Rows.Count) 13648this.Rows.ClearInternal(false /*recreateNewRow*/); 13668int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Displayed); 13671this.lstRows.Add(this.Rows[rowIndex]); 13675rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Displayed); 13738if (this.Columns.Count != 0 && this.Rows.Count == 0) 14177int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 14906(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 && 15150dataGridViewRow = this.Rows[index]; 15269Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 15288(this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.ReadOnly) == 0 && 15331Debug.Assert(!this.Rows[dataGridViewCell.RowIndex].ReadOnly); 15496int totalVisibleHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible); 15497int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 15816this.Rows.GetRowCount(DataGridViewElementStates.Visible) == 1 /*forceCurrentCellSelection*/); 15906if (this.Rows.Count > 0) 15917DataGridViewRow newRow = this.Rows[this.newRowIndex]; 15924for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 15926DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 15944for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 15946DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 16148DataGridViewRow dataGridViewRow = this.Rows[this.ptCurrentCell.Y]; 16206DataGridViewRow dataGridViewRow = this.Rows[this.ptCurrentCell.Y]; 16240DataGridViewRow dataGridViewRow = this.Rows[this.ptCurrentCell.Y]; 16352if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 16373if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 16383if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 16438if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 16474if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 16485if (rowIndex < this.Rows.Count) 16489Debug.Assert(this.Rows[rowIndex].Resizable == DataGridViewTriState.True); 16586this.ptMouseEnteredCell.Y >= -1 && this.ptMouseEnteredCell.Y < this.Rows.Count) 16825if (dgvcme.ColumnIndex < this.Columns.Count && dgvcme.RowIndex < this.Rows.Count) 17021int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 17023this.vertScrollBar.Value + this.Rows.SharedRow(this.displayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(this.displayedBandsInfo.FirstDisplayedScrollingRow) <= 17028Debug.Assert(totalVisibleFrozenHeight == this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 17032if (this.vertScrollBar.Value + this.Rows.SharedRow(this.displayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(this.displayedBandsInfo.FirstDisplayedScrollingRow) > 17317!this.Rows[this.ptCurrentCell.Y].Cells[this.ptCurrentCell.X].ReadOnly) // Unshares the row 17558this.Rows.ClearInternal(false /*recreateNewRow*/); 17564for (int rowIndex = 0; rowIndex < this.Rows.Count; rowIndex++) 17566DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 17690Debug.Assert(rowIndexDeleted >= 0 && rowIndexDeleted < this.Rows.Count); 17701int rowIndexPrevious = this.Rows.GetPreviousRow(rowIndexDeleted, DataGridViewElementStates.Visible); 17702int rowIndexNext = this.Rows.GetNextRow(rowIndexDeleted, DataGridViewElementStates.Visible); 17706Debug.Assert(this.newRowIndex == this.Rows.Count-1); 17707if (rowIndexNext > -1 && rowIndexNext < this.Rows.Count - 1) 17969this.Rows.Count == 0 && 17993DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 18075if (!e.Handled && e.Button == MouseButtons.Left && e.RowIndex < this.Rows.Count) 18120if (rowIndex < this.Rows.Count && 18130DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs(this.Rows[this.newRowIndex]); 18161if (calledAddNewOnTheDataConnection && rowIndex > this.Rows.Count - 1) 18165rowIndex = Math.Min(rowIndex, this.Rows.Count - 1); 18187Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 18188dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 18257DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 18349rowDisplayed = (this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 18361(this.rowHeadersWidthSizeMode == DataGridViewRowHeadersWidthSizeMode.AutoSizeToFirstHeader && rowIndex != -1 && rowIndex == this.Rows.GetFirstRow(DataGridViewElementStates.Visible))) 18426((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) != 0)) 18481if (hti.row >= this.Rows.Count) 18483int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 18505else if ((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Visible) == 0) 18517(this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18578else if ((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) == 0) 18581((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.Selected) != 0)); 18823if (rowIndex < this.Rows.Count && columnIndex < this.Columns.Count) 18835Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 18836dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 18958SelectRowRange(this.Rows.GetNextRow(this.trackRowEdge, DataGridViewElementStates.Visible), 18964SelectRowRange(this.Rows.GetNextRow(hti.row, DataGridViewElementStates.Visible), 18970SelectRowRange(this.Rows.GetNextRow(this.trackRow, DataGridViewElementStates.Visible), 18977this.Rows.GetPreviousRow(this.trackRowEdge, DataGridViewElementStates.Visible), 18984this.Rows.GetPreviousRow(hti.row, DataGridViewElementStates.Visible), 18991this.Rows.GetPreviousRow(this.trackRow, DataGridViewElementStates.Visible), 18997SelectRowRange(this.Rows.GetNextRow(this.trackRow, DataGridViewElementStates.Visible), 19000this.Rows.GetPreviousRow(this.trackRow, DataGridViewElementStates.Visible), 19007this.Rows.GetPreviousRow(this.trackRow, DataGridViewElementStates.Visible), 19009SelectRowRange(this.Rows.GetNextRow(this.trackRow, DataGridViewElementStates.Visible), 19108newState = this.Rows.GetRowState(rowIndex); 19143this.Rows.SetRowState(rowIndex, DataGridViewElementStates.Displayed, false); 19149bool rowDisplayed = (this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Displayed) != 0; 19175dataGridViewRow = this.Rows[rowIndex]; 19187if (rowVisible && this.Rows.GetRowCount(DataGridViewElementStates.Visible) > 1) 19270if (dataGridViewCell != null && rowIndex < this.Rows.Count && columnIndex < this.Columns.Count) 19272dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 19318Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.Columns.Count); 19319dataGridViewCell = this.Rows.SharedRow(rowIndex).Cells[columnIndex]; 19399int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 19405rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 19649int rowIndex = this.Rows.GetPreviousRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible); 19694rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19698if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 19714this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 19715rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19725Debug.Assert((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Visible) != 0); 19731if ((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) != 0) 19747this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, true); 19748rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 19770int visibleRowsHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Displayed); 20049if (this.Columns.Count > 0 || this.Rows.Count > 0) 20119indexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 20132int rowHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 20133this.Rows.SharedRow(indexTmp).CachedThickness = rowHeight; 20137rowBounds.Height = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 20144indexTmpNext = this.Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 20148dataGridViewRow = this.Rows.SharedRow(indexTmp); 20153this.Rows.GetRowState(indexTmp), 20170Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Frozen) == 0); 20171Debug.Assert((this.Rows.GetRowState(indexTmp) & DataGridViewElementStates.Visible) != 0); 20184int rowHeight = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 20185this.Rows.SharedRow(indexTmp).CachedThickness = rowHeight; 20189rowBounds.Height = this.Rows.SharedRow(indexTmp).GetHeight(indexTmp); 20196indexTmpNext = this.Rows.GetNextRow(indexTmp, DataGridViewElementStates.Visible); 20200dataGridViewRow = this.Rows.SharedRow(indexTmp); 20205this.Rows.GetRowState(indexTmp), 20318DataGridViewRow newRow = this.Rows.SharedRow(this.newRowIndex); 20324newRow = this.Rows[this.newRowIndex]; // unshare the 'new row'. 20368this.Columns[this.ptCurrentCell.X].Width, this.Rows.SharedRow(this.ptCurrentCell.Y).GetHeight(this.ptCurrentCell.Y)); 20380if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 20382int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 20482if (rowIndex == this.newRowIndex || rowIndex >= this.Rows.Count) 20488DataGridViewRowCancelEventArgs dgvrce = new DataGridViewRowCancelEventArgs(this.Rows[rowIndex]); 20492DataGridViewRow dataGridViewRow = this.Rows[rowIndex]; 20495int dataGridRowsCount = this.Rows.Count; 20547if (dataGridRowsCount != this.Rows.Count) 20560this.Rows.RemoveAtInternal(rowIndex, false /*force*/); 20709int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 20718nextVisibleRowIndex = this.Rows.GetNextRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible); 21212if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21243if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21291if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21346if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21433if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21553int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 21554int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 21629(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21645(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21661(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22008int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 22083(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22099(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22115(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 22509int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 23254nextScreenVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 23265if ((this.Rows.GetRowState(nextScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 23269int firstDisplayedScrollingRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 23276jumpRows = this.Rows.GetRowCount(DataGridViewElementStates.Visible, 23295nextScreenVisibleRowIndexTmp = this.Rows.GetNextRow(nextScreenVisibleRowIndex, DataGridViewElementStates.Visible); 23420if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23442if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23494previousScreenVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 23506if ((this.Rows.GetRowState(previousScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 23522previousScreenVisibleRowIndexTmp = this.Rows.GetPreviousRow(previousScreenVisibleRowIndex, DataGridViewElementStates.Visible); 23530if ((this.Rows.GetRowState(previousScreenVisibleRowIndex) & DataGridViewElementStates.Frozen) != 0) 23533int firstDisplayedScrollingRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 23541previousScreenVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 23659if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23681if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23748int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 24521if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24745int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 24753previousVisibleRowIndex = this.Rows.GetPreviousRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible); 25158if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25185if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25225if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25271if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25344if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25503Debug.Assert(this.newRowIndex == this.Rows.Count - 1); 25504this.Rows.RemoveAtInternal(this.newRowIndex, false /*force*/); 25528dataGridViewCurrentCell = this.Rows[this.ptCurrentCell.Y].Cells[this.ptCurrentCell.X]; // unsharing the row before pushing the new value 25549dataGridViewCurrentCell = this.Rows[this.ptCurrentCell.Y].Cells[this.ptCurrentCell.X]; // unsharing the row before pushing the new value 25567this.Rows.ClearInternal(false /*recreateNewRow*/); 25691this.Rows.ClearInternal(true /*recreateNewRow*/); 25714this.Rows.AddInternal(this.RowTemplateClone); 25718this.Rows.AddCopiesInternal(0, rowsCount-1); 26043for (int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 26045rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible)) 26047DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 26067DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 26081Debug.Assert(rowIndex < this.Rows.Count); 26083DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 26312Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 26313Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= -1 && this.displayedBandsInfo.FirstDisplayedScrollingRow < this.Rows.Count); 26315Debug.Assert((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 26371Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 26373if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Frozen) == 0) 26386rowsToScroll = this.Rows.GetRowCount(DataGridViewElementStates.Visible, rowIndex, this.displayedBandsInfo.FirstDisplayedScrollingRow); 26394int yRowBottomEdge = GetRowYFromIndex(rowIndex) + this.Rows.SharedRow(rowIndex).GetHeight(rowIndex); 26397yRowBottomEdge -= this.Rows.SharedRow(firstDisplayedScrollingRow).GetHeight(firstDisplayedScrollingRow); 26401firstDisplayedScrollingRow = this.Rows.GetNextRow(firstDisplayedScrollingRow, DataGridViewElementStates.Visible); 26426Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingRow >= this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 26433int frozenRowsThickness = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 26456(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26483int firstVisibleScrollingRow = this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 26485int newScrolledOffRowCount = this.Rows.GetRowCount(DataGridViewElementStates.Visible, firstVisibleScrollingRow, this.displayedBandsInfo.FirstDisplayedScrollingRow); 26504deltaY -= this.Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26505newFirstVisibleScrollingRow = this.Rows.GetNextRow(newFirstVisibleScrollingRow, 26520deltaY = -this.Rows.GetRowsHeight(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, this.displayedBandsInfo.FirstDisplayedScrollingRow); 26521rows = this.Rows.GetRowCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, this.displayedBandsInfo.FirstDisplayedScrollingRow); 26534newFirstVisibleScrollingRow = this.Rows.GetPreviousRow(newFirstVisibleScrollingRow, 26539deltaY += this.Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26566deltaY = this.Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26569newFirstVisibleScrollingRow = this.Rows.GetNextRow(newFirstVisibleScrollingRow, DataGridViewElementStates.Visible); 26576deltaY += this.Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26582newFirstVisibleScrollingRow = this.Rows.GetPreviousRow(newFirstVisibleScrollingRow, 26586deltaY = -this.Rows.SharedRow(newFirstVisibleScrollingRow).GetHeight(newFirstVisibleScrollingRow); 26589int scrollingRowTmp = this.Rows.GetPreviousRow(newFirstVisibleScrollingRow, 26594deltaY -= this.Rows.SharedRow(scrollingRowTmp).GetHeight(scrollingRowTmp); 26616scrollHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, this.displayedBandsInfo.FirstDisplayedScrollingRow); 26617rowCount = this.Rows.GetRowCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingRow, this.displayedBandsInfo.FirstDisplayedScrollingRow); 26622scrollHeight = -this.Rows.GetRowsHeight(DataGridViewElementStates.Visible, this.displayedBandsInfo.FirstDisplayedScrollingRow, oldFirstVisibleScrollingRow); 26623rowCount = -this.Rows.GetRowCount(DataGridViewElementStates.Visible, this.displayedBandsInfo.FirstDisplayedScrollingRow, oldFirstVisibleScrollingRow); 26655int rowIndex = 0, maxRowIndex = this.Rows.Count; 26658dataGridViewRow = this.Rows[rowIndex]; //unsharing each row! 26673int rowIndex = 0, maxRowIndex = this.Rows.Count; 26676DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 26712int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 26751if (index >= this.Rows.Count) 26753index -= this.Rows.Count; 26759return this.Rows.SharedRow(index).Cells[columnIndex]; 26784return this.Rows.SharedRow(rowIndex).Cells[index]; 26838rowIndex >= this.Rows.Count) 26845!IsSharedCellVisible(this.Rows.SharedRow(rowIndex).Cells[columnIndex], rowIndex)) 26865rowIndex < this.Rows.Count); 26906currentCell = this.Rows.SharedRow(oldCurrentCellY).Cells[oldCurrentCellX]; 26909currentCell = this.Rows[oldCurrentCellY].Cells[oldCurrentCellX]; // unsharing the current row 26979if (rowIndex >= this.Rows.Count) 27016currentCell = this.Rows[rowIndex].Cells[columnIndex]; // unsharing the row 27023if (oldCurrentCellX < this.Columns.Count && oldCurrentCellY < this.Rows.Count) 27027if (oldCurrentCellY != this.ptCurrentCell.Y && this.RowHeadersVisible && oldCurrentCellY < this.Rows.Count) 27104currentCell = this.Rows.SharedRow(oldCurrentCellY).Cells[oldCurrentCellX]; 27107currentCell = this.Rows[oldCurrentCellY].Cells[oldCurrentCellX]; // unsharing the current row 27164if (oldCurrentCellX < this.Columns.Count && oldCurrentCellY < this.Rows.Count) 27168if (this.RowHeadersVisible && oldCurrentCellY < this.Rows.Count) 27374if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 27488rowIndex < this.Rows.Count); 27491DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 27492DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 27495DataGridViewCell dataGridViewCell = this.Rows[rowIndex].Cells[columnIndex]; 27520dataGridViewCellTmp = this.Rows[row].Cells[columnIndex]; 27524for (int row = rowIndex+1; row < this.Rows.Count; row++) 27526dataGridViewCellTmp = this.Rows[row].Cells[columnIndex]; 27533this.Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, false); 27536dataGridViewCellTmp = this.Rows[rowIndex].Cells[column]; 27542dataGridViewCellTmp = this.Rows[rowIndex].Cells[column]; 27593Debug.Assert(rowIndex >= 0 && rowIndex < this.Rows.Count); 27595DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 27612this.Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, true); 27617this.Rows.SetRowState(rowIndex, DataGridViewElementStates.ReadOnly, false); 27638if (rowIndex < 0 || rowIndex >= this.Rows.Count) 27644DataGridViewRow dataGridViewRow = this.Rows.SharedRow(rowIndex); 27645DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 27648DataGridViewCell dataGridViewCell = this.Rows[rowIndex].Cells[columnIndex]; 27671if (this.Rows.Count > DATAGRIDVIEW_bulkPaintThreshold) 27684dataGridViewCellTmp = this.Rows[row].Cells[columnIndex]; 27688for (int row = rowIndex+1; row < this.Rows.Count; row++) 27690dataGridViewCellTmp = this.Rows[row].Cells[columnIndex]; 27714this.Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, false); 27717dataGridViewCellTmp = this.Rows[rowIndex].Cells[column]; 27723dataGridViewCellTmp = this.Rows[rowIndex].Cells[column]; 27750(this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 27878if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) == 0) 27881((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 27887if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0) 27890((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != 0)); 28068if (rowIndex < 0 || rowIndex >= this.Rows.Count) 28076DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex); 28087this.Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, true); 28094this.Rows.SetRowState(rowIndex, DataGridViewElementStates.Selected, false); 28248int visibleFrozenRows = this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28251int rowVFIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28253this.Rows.SetRowState(rowVFIndex, DataGridViewElementStates.Frozen, false); 28254Debug.Assert(0 == this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 28285this.Rows.Sort(comparer, direction == ListSortDirection.Ascending); 28309int rowVIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 28313rowVIndex = this.Rows.GetNextRow(rowVIndex, DataGridViewElementStates.Visible); 28317this.Rows.SetRowState(rowVIndex, DataGridViewElementStates.Frozen, true); 28486int totalVisibleFrozenHeight = this.Rows.GetRowsHeight(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28493if (this.vertScrollBar.Value + this.Rows.SharedRow(this.displayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(this.displayedBandsInfo.FirstDisplayedScrollingRow) <= 28513int firstDisplayedScrollingRowHeight = this.Rows.SharedRow(this.displayedBandsInfo.FirstDisplayedScrollingRow).GetHeight(this.displayedBandsInfo.FirstDisplayedScrollingRow); 28547int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 28566nextVisibleRowIndex = this.Rows.GetNextRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible); 28703int firstVisibleRowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible); 28724previousVisibleRowIndex = this.Rows.GetPreviousRow(this.ptCurrentCell.Y, DataGridViewElementStates.Visible); 28731int lastVisibleRowIndex = this.Rows.GetLastRow(DataGridViewElementStates.Visible); 28910if (rowIndex < -1 || rowIndex >= this.Rows.Count) 28927if (rowIndex < 0 || rowIndex >= this.Rows.Count) 28982if (rowIndex < 0 || rowIndex >= this.Rows.Count) 28995if (rowIndexStart < 0 || rowIndexStart >= this.Rows.Count) 28999if (rowIndexEnd < 0 || rowIndexEnd >= this.Rows.Count) 29033if ((updateToEnd && rowIndex < 0) || (!updateToEnd && rowIndex < -1) || rowIndex >= this.Rows.Count) 29038this.Rows.InvalidateCachedRowsHeights(); 29040bool rowVisible = (rowIndex >= 0 && (this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) != 0); 29074rowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible); 29158rowIndexTmp = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 29162if (((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) == displayed) 29164this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, displayed); 29166rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 29180if (((this.Rows.GetRowState(rowIndexTmp) & DataGridViewElementStates.Displayed) == 0) == displayed) 29182this.Rows.SetRowState(rowIndexTmp, DataGridViewElementStates.Displayed, displayed); 29184rowIndexTmp = this.Rows.GetNextRow(rowIndexTmp, DataGridViewElementStates.Visible); 29213this.ptMouseEnteredCell.Y < this.Rows.Count) 29237this.ptMouseEnteredCell.Y < this.Rows.Count) 29315this.Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29324this.Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29340this.Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29349this.Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29362this.Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29379this.Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29402this.Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29420this.Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29435this.Rows.GetPreviousRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29455this.Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29495this.Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29507this.Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29534this.Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29549this.Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29569this.Rows.GetNextRow(anchorRowIndex, DataGridViewElementStates.Visible), 29606this.Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29621this.Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29647this.Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29662this.Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29681this.Rows.GetNextRow(oldEdgeRowIndex, DataGridViewElementStates.Visible), 29701this.Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29709this.Rows.GetPreviousRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29725this.Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29733this.Rows.GetNextRow(newEdgeRowIndex, DataGridViewElementStates.Visible), 29872dataGridViewCell = this.Rows.SharedRow(hti.row).Cells[hti.col]; 29880dataGridViewCell = this.Rows.SharedRow(hti.row).HeaderCell;
winforms\Managed\System\WinForms\DataGridViewRow.cs (19)
1313if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 1343if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 1390if (!(this.DataGridView == null || (rowIndex >= 0 && rowIndex < this.DataGridView.Rows.Count))) 1474if (!(this.DataGridView == null || (rowIndex >= 0 && rowIndex < this.DataGridView.Rows.Count))) 1478if (this.DataGridView == null || this.DataGridView.Rows.SharedRow(rowIndex).Index != -1) 1488return this.DataGridView.Rows.GetRowState(rowIndex); 1500this.DataGridView.Rows.InvalidateCachedRowCount(elementState); 1501this.DataGridView.Rows.InvalidateCachedRowsHeight(elementState); 1526DataGridViewRow sharedRow = dataGridView.Rows.SharedRow(rowIndex); 1567sharedRow = dataGridView.Rows.SharedRow(rowIndex); 1938int visibleRowIndex = this.owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, this.owner.Index); 1957int visibleRowIndex = this.owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, this.owner.Index); 1963if (this.owner.DataGridView.Rows[0].Visible == false) 2241if (this.owner.Index != this.owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 2243int nextVisibleRow = this.owner.DataGridView.Rows.GetNextRow(this.owner.Index, DataGridViewElementStates.Visible); 2244int actualDisplayIndex = this.owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, nextVisibleRow); 2260if (this.owner.Index != this.owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 2262int previousVisibleRow = this.owner.DataGridView.Rows.GetPreviousRow(this.owner.Index, DataGridViewElementStates.Visible); 2263int actualDisplayIndex = this.owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, previousVisibleRow);
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (9)
224if (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count) 421if (this.DataGridView != null && (rowIndex < 0 || rowIndex >= this.DataGridView.Rows.Count)) 702if (this.DataGridView != null && (rowIndex < -1 || rowIndex >= this.DataGridView.Rows.Count)) 1364if (this.Owner.OwningRow.Index == this.Owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 1370int nextVisibleRow = this.Owner.DataGridView.Rows.GetNextRow(this.Owner.OwningRow.Index, DataGridViewElementStates.Visible); 1371int actualDisplayIndex = this.Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, nextVisibleRow); 1393if (this.Owner.OwningRow.Index == this.Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 1408int previousVisibleRow = this.Owner.DataGridView.Rows.GetPreviousRow(this.Owner.OwningRow.Index, DataGridViewElementStates.Visible); 1409int actualDisplayIndex = this.Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible, 0, previousVisibleRow);
winforms\Managed\System\WinForms\DataGridViewRowPostPaintEventArgs.cs (10)
158if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 162this.dataGridView.Rows.SharedRow(rowIndex).DrawFocus(this.graphics, 174if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 178this.dataGridView.Rows.SharedRow(rowIndex).PaintCells(this.graphics, 191if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 200this.dataGridView.Rows.SharedRow(rowIndex).PaintCells(this.graphics, 213if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 217this.dataGridView.Rows.SharedRow(rowIndex).PaintCells(this.graphics, 241if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 245this.dataGridView.Rows.SharedRow(rowIndex).PaintHeader(this.graphics,
winforms\Managed\System\WinForms\DataGridViewRowPrePaintEventArgs.cs (10)
177if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 181this.dataGridView.Rows.SharedRow(this.rowIndex).DrawFocus(this.graphics, 193if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 197this.dataGridView.Rows.SharedRow(this.rowIndex).PaintCells(this.graphics, 210if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 219this.dataGridView.Rows.SharedRow(this.rowIndex).PaintCells(this.graphics, 232if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 236this.dataGridView.Rows.SharedRow(this.rowIndex).PaintCells(this.graphics, 260if (this.rowIndex < 0 || this.rowIndex >= this.dataGridView.Rows.Count) 264this.dataGridView.Rows.SharedRow(this.rowIndex).PaintHeader(this.graphics,
winforms\Managed\System\WinForms\DataGridViewTextBoxColumn.cs (1)
72DataGridViewRowCollection dataGridViewRows = this.DataGridView.Rows;
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (3)
644this.Owner.DataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible) > 0) 648DataGridViewRow row = this.Owner.DataGridView.Rows[this.Owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)];
System.WorkflowServices (28)
System\Workflow\Activities\Design\ServiceOperationDetailViewControl.cs (28)
96this.parametersGrid.Rows.Add(this.ParameterTemplateRowName, null, null); 164Fx.Assert(this.parametersGrid.Rows.Count != 0, "parameters grid should have atleast the dummy <add new> item"); 165this.parametersGrid.Rows.Insert(this.parametersGrid.Rows.Count - 1, GenerateParameterName(), typeof(string), SR2.GetString(SR2.ParameterDirectionIn)); 167this.parametersGrid.CurrentCell = this.parametersGrid.Rows[this.parametersGrid.Rows.Count - 2].Cells[this.nameColumn.Index]; 224DataGridViewCell currentCell = this.parametersGrid.Rows[combo.EditingControlRowIndex].Cells[this.typeColumn.Index]; 294Fx.Assert(currentRowIndex < (this.parametersGrid.Rows.Count - 2), "cant move down the template row or the one above it"); 296this.parametersGrid.Rows.Remove(currentRow); 297this.parametersGrid.Rows.Insert(currentRowIndex + 1, currentRow); 309Fx.Assert(currentRowIndex != (this.parametersGrid.Rows.Count - 1), "cant move up the template row"); 311this.parametersGrid.Rows.Remove(currentRow); 312this.parametersGrid.Rows.Insert(currentRowIndex - 1, currentRow); 372if (typeof(void).ToString().Equals(e.FormattedValue) && !(this.parametersGrid.Rows[e.RowIndex].Cells[this.nameColumn.Index].Value.Equals(SR2.GetString(SR2.ReturnValueString)))) 413if (!this.parametersGrid.Rows[this.parametersGrid.RowCount - 1].Cells[this.nameColumn.Index].Value.Equals(this.ParameterTemplateRowName)) 415DataGridViewRow editedRow = this.parametersGrid.Rows[e.RowIndex]; 419this.parametersGrid.Rows.Add(this.ParameterTemplateRowName, null, null); 423DataGridViewCell currentCell = this.parametersGrid.Rows[e.RowIndex].Cells[e.ColumnIndex]; 526this.parametersGrid.Rows.Add(new object[] { paramName, paramType, direction }); 531this.parametersGrid.Rows.Insert(0, new object[] { SR2.GetString(SR2.ReturnValueString), returnType, SR2.GetString(SR2.ParameterDirectionOut) }); 532DataGridViewRow returnValueRow = this.parametersGrid.Rows[0]; 569if (currentRowIndex != (this.parametersGrid.Rows.Count - 1) && (currentRowIndex != 0)) 576if (currentRowIndex < (this.parametersGrid.Rows.Count - 2)) 588Fx.Assert(currentRowIndex != (this.parametersGrid.Rows.Count - 1), "cant delete the template row"); 590this.parametersGrid.Rows.Remove(currentRow); 702foreach (DataGridViewRow row in this.parametersGrid.Rows) 760foreach (DataGridViewRow row in this.parametersGrid.Rows) 773if (parameterName.Equals(this.ParameterTemplateRowName) && (e.RowIndex == this.parametersGrid.Rows.Count - 1))