62 writes to HeaderCell
System.Windows.Forms (2)
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
293value.OwningRow?.HeaderCell = null;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1066dataGridViewRow.HeaderCell = (DataGridViewRowHeaderCell)HeaderCell.Clone();
System.Windows.Forms.Tests (60)
System\Windows\Forms\DataGridViewHeaderCellTests.cs (34)
75row.HeaderCell = cell; 181row.HeaderCell = cell; 357row.HeaderCell = cell; 582row.HeaderCell = cell; 653row.HeaderCell = cell; 745row.HeaderCell = cell; 791row.HeaderCell = cell; 887row.HeaderCell = cell; 967row.HeaderCell = cell; 1093row.HeaderCell = cell; 1146row.HeaderCell = cell; 1230row.HeaderCell = cell; 1279row.HeaderCell = cell; 1352row.HeaderCell = cell; 1400row.HeaderCell = cell; 1530row.HeaderCell = cell; 1551row.HeaderCell = cell; 1672row.HeaderCell = cell; 1701row.HeaderCell = cell; 1860row.HeaderCell = cell; 1940row.HeaderCell = cell; 2580row.HeaderCell = cell; 2606row.HeaderCell = cell; 2809row.HeaderCell = cell; 2845row.HeaderCell = cell; 3026row.HeaderCell = cell; 3074row.HeaderCell = cell; 3147row.HeaderCell = cell; 3202row.HeaderCell = cell; 3296row.HeaderCell = cell; 3395row.HeaderCell = cell; 3412row.HeaderCell = cell; 3483row.HeaderCell = cell; 3500row.HeaderCell = cell;
System\Windows\Forms\DataGridViewRowTests.cs (26)
1479HeaderCell = value 1493row.HeaderCell = value; 1513HeaderCell = oldValue 1515row.HeaderCell = value; 1529row.HeaderCell = value; 1548HeaderCell = value 1552HeaderCell = value 1559row.HeaderCell = value; 1576row.HeaderCell = value; 1589row.HeaderCell = value; 1613row.HeaderCell = oldValue; 1615row.HeaderCell = value; 1629row.HeaderCell = value; 1653row.HeaderCell = value; 1666row.HeaderCell = value; 1690row.HeaderCell = oldValue; 1692row.HeaderCell = value; 1706row.HeaderCell = value; 1740row.HeaderCell = cell1; 1745row.HeaderCell = cell1; 1751row.HeaderCell = cell2; 1756row.HeaderCell = null; 1762row.HeaderCell = cell1; 3936HeaderCell = cell, 3979HeaderCell = cell, 4026source.HeaderCell = cell;
197 references to HeaderCell
System.Windows.Forms (60)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (2)
179return owner.Rows[hti.RowIndex].HeaderCell.AccessibilityObject; 281result[i] = owner.Rows[rowIndex].HeaderCell.AccessibilityObject;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (27)
390dataGridViewCell = Rows.SharedRow(rowIndex).HeaderCell; 467dataGridViewCell = Rows.SharedRow(rowIndex).HeaderCell; 2030? Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, Rows.SharedRow(rowIndex).GetHeight(rowIndex))) 2031: Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2047? Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndex, dataGridViewRowHeight)) 2048: Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndex).Width); 2064? Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndex, dataGridViewRowHeight)) 2065: Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndex).Width); 2081? Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, Rows.SharedRow(rowIndex).GetHeight(rowIndex))) 2082: Math.Max(preferredWidth, Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2192? Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))) 2193: Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2209? Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndexTmp, dataGridViewRowHeight)) 2210: Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2226? Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndexTmp, dataGridViewRowHeight)) 2227: Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2243? Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))) 2244: Math.Max(preferredWidth, Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 7108return columnIndex >= 0 ? dataGridViewRow.Cells[columnIndex] : dataGridViewRow.HeaderCell; 7337cellContent = Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal( 7357cellContent = Rows.SharedRow(rowIndex).HeaderCell.GetClipboardContentInternal( 7633.HeaderCell 7655.HeaderCell 8062.HeaderCell 8082.HeaderCell 25612row.HeaderCell.ReleaseUiaProvider(); 29985dataGridViewCell = Rows.SharedRow(hti._row).HeaderCell;
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
287nameof(DataGridViewRow.HeaderCell),
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
720return [_owner.OwningRow.HeaderCell.AccessibilityObject];
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (7)
603if (HeaderCell.HasStyle) 605cellStyle = HeaderCell.Style; 1066dataGridViewRow.HeaderCell = (DataGridViewRowHeaderCell)HeaderCell.Clone(); 1151HeaderCell.DataGridView = null; 1302preferredRowThickness = Math.Max(preferredRowThickness, HeaderCell.GetPreferredHeight(rowIndex, DataGridView.RowHeadersWidth)); 1306preferredRowThickness = Math.Max(preferredRowThickness, HeaderCell.GetPreferredSize(rowIndex).Height); 1721HeaderCell.PaintWork(graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
265return _owningDataGridViewRow.HeaderCell.AccessibilityObject;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (21)
153newDataGridViewRow.HeaderCell.DataGridView = dataGridViewRow.DataGridView; 154newDataGridViewRow.HeaderCell.OwningRow = newDataGridViewRow; 248dataGridViewRow.HeaderCell.DataGridView = DataGridView; 249dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 364rowTemplate.HeaderCell.DataGridView = _dataGridView; 365rowTemplate.HeaderCell.OwningRow = rowTemplate; 434dataGridViewRow.HeaderCell.DataGridView = DataGridView; 435dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 693dataGridViewRow.HeaderCell.DataGridView = _dataGridView; 694dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 760dataGridViewRow.HeaderCell.DataGridView = _dataGridView; 761dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 1445rowTemplate.HeaderCell.DataGridView = _dataGridView; 1446rowTemplate.HeaderCell.OwningRow = rowTemplate; 1536dataGridViewRow.HeaderCell.DataGridView = DataGridView; 1537dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 1727dataGridViewRow.HeaderCell.DataGridView = _dataGridView; 1728dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 1810dataGridViewRow.HeaderCell.DataGridView = DataGridView; 1811dataGridViewRow.HeaderCell.OwningRow = dataGridViewRow; 2186row.HeaderCell.ReleaseUiaProvider();
System.Windows.Forms.Tests (136)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (9)
1218Assert.Equal(dataGridView.Rows[0].HeaderCell.AccessibilityObject, rowHeaders[0]); 1219Assert.Equal(dataGridView.Rows[1].HeaderCell.AccessibilityObject, rowHeaders[1]); 1220Assert.Equal(dataGridView.Rows[2].HeaderCell.AccessibilityObject, rowHeaders[2]); 1238Assert.Equal(dataGridView.Rows[1].HeaderCell.AccessibilityObject, rowHeaders[0]); 1239Assert.Equal(dataGridView.Rows[2].HeaderCell.AccessibilityObject, rowHeaders[1]); 1257Assert.Equal(dataGridView.Rows[0].HeaderCell.AccessibilityObject, rowHeaders[0]); 1258Assert.Equal(dataGridView.Rows[2].HeaderCell.AccessibilityObject, rowHeaders[1]); 1276Assert.Equal(dataGridView.Rows[0].HeaderCell.AccessibilityObject, rowHeaders[0]); 1277Assert.Equal(dataGridView.Rows[1].HeaderCell.AccessibilityObject, rowHeaders[1]);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (8)
1087AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1144AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1163AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1182AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1263AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1288AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1310AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1332AccessibleObject rowHeader = dataGridView.Rows[0].HeaderCell.AccessibilityObject;
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (26)
1205AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1308AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1326AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1344AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1364AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1466AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1487AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1508AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1529AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1633AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1651AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1669AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1689AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1791AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1812AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1833AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1854AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1967AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 1992AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2010AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2031AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2052AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2164AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2190AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2214AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject; 2238AccessibleObject topLeftAccessibilityObject = dataGridView.Rows[0].HeaderCell.AccessibilityObject;
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (13)
31DataGridViewRowHeaderCell cell = control.Rows[0].HeaderCell; 60Assert.Equal(row.AccessibilityObject.Name, row.HeaderCell.AccessibilityObject.Name); 79var accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)control.Rows[0].HeaderCell.AccessibilityObject; 94DataGridViewRowHeaderCell cell = control.Rows[0].HeaderCell; 114DataGridViewRowHeaderCell cell = control.Rows[0].HeaderCell; 130var accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)control.Rows[0].HeaderCell.AccessibilityObject; 144var accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject; 169AccessibleObject accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject; 186AccessibleObject accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject; 204AccessibleObject accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject; 223AccessibleObject accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject; 239var accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject; 254var accessibleObject = (DataGridViewRowHeaderCellAccessibleObject)row.HeaderCell.AccessibilityObject;
System\Windows\Forms\DataGridViewRowTests.cs (79)
31Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 32Assert.Same(row.HeaderCell, row.HeaderCell); 36Assert.Equal(row, row.HeaderCell.OwningRow); 1377Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 1378Assert.Same(row, row.HeaderCell.OwningRow); 1379Assert.Null(row.HeaderCell.OwningColumn); 1380Assert.Same(row.HeaderCell, row.HeaderCell); 1381Assert.Same(row.HeaderCell, row.HeaderCellCore); 1395Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 1396Assert.Same(row, row.HeaderCell.OwningRow); 1397Assert.Null(row.HeaderCell.OwningColumn); 1398Assert.Same(row.HeaderCell, row.HeaderCell); 1399Assert.Same(row.HeaderCell, row.HeaderCellCore); 1413Assert.IsType<DataGridViewRowHeaderCell>(row.HeaderCell); 1414Assert.Same(row, row.HeaderCell.OwningRow); 1415Assert.Null(row.HeaderCell.OwningColumn); 1416Assert.Same(row.HeaderCell, row.HeaderCell); 1417Assert.Same(row.HeaderCell, row.HeaderCellCore); 1428Assert.Same(row.HeaderCell, row.HeaderCellCore); 1446Assert.Same(row.HeaderCell, row.HeaderCellCore); 1464Assert.Same(row.HeaderCell, row.HeaderCellCore); 1483Assert.Same(value, row.HeaderCell); 1487Assert.NotNull(row.HeaderCell); 1490Assert.Equal(row, row.HeaderCell.OwningRow); 1496Assert.Same(value, row.HeaderCell); 1500Assert.NotNull(row.HeaderCell); 1503Assert.Equal(row, row.HeaderCell.OwningRow); 1519Assert.Same(value, row.HeaderCell); 1523Assert.NotNull(row.HeaderCell); 1526Assert.Equal(row, row.HeaderCell.OwningRow); 1532Assert.Same(value, row.HeaderCell); 1536Assert.NotNull(row.HeaderCell); 1539Assert.Equal(row, row.HeaderCell.OwningRow); 1554Assert.Same(value, row.HeaderCell); 1555Assert.NotSame(value, otherRow.HeaderCell); 1556Assert.Equal(row, row.HeaderCell.OwningRow); 1560Assert.Same(value, row.HeaderCell); 1561Assert.NotSame(value, otherRow.HeaderCell); 1562Assert.Equal(row, row.HeaderCell.OwningRow); 1579Assert.Same(value, row.HeaderCell); 1583Assert.NotNull(row.HeaderCell); 1586Assert.Equal(row, row.HeaderCell.OwningRow); 1592Assert.Same(value, row.HeaderCell); 1596Assert.NotNull(row.HeaderCell); 1599Assert.Equal(row, row.HeaderCell.OwningRow); 1619Assert.Same(value, row.HeaderCell); 1623Assert.NotNull(row.HeaderCell); 1626Assert.Equal(row, row.HeaderCell.OwningRow); 1632Assert.Same(value, row.HeaderCell); 1636Assert.NotNull(row.HeaderCell); 1639Assert.Equal(row, row.HeaderCell.OwningRow); 1656Assert.Same(value, row.HeaderCell); 1660Assert.NotNull(row.HeaderCell); 1663Assert.Equal(row, row.HeaderCell.OwningRow); 1669Assert.Same(value, row.HeaderCell); 1673Assert.NotNull(row.HeaderCell); 1676Assert.Equal(row, row.HeaderCell.OwningRow); 1696Assert.Same(value, row.HeaderCell); 1700Assert.NotNull(row.HeaderCell); 1703Assert.Equal(row, row.HeaderCell.OwningRow); 1709Assert.Same(value, row.HeaderCell); 1713Assert.NotNull(row.HeaderCell); 1716Assert.Equal(row, row.HeaderCell.OwningRow); 1741Assert.Same(cell1, row.HeaderCell); 1746Assert.Same(cell1, row.HeaderCell); 1752Assert.Same(cell2, row.HeaderCell); 1757Assert.NotNull(row.HeaderCell); 1763Assert.Equal(cell1, row.HeaderCell); 3913Assert.NotNull(row.HeaderCell); 3952Assert.NotNull(row.HeaderCell); 3953Assert.NotSame(cell, row.HeaderCell); 3995Assert.NotNull(row.HeaderCell); 3996Assert.NotSame(cell, row.HeaderCell); 4044Assert.NotNull(row.HeaderCell); 4045Assert.NotSame(cell, row.HeaderCell);
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
150dataGridView.Rows[i].HeaderCell.Value = $"Row {i + 1}";
WinFormsControlsTest (1)
DataGridViewTest.cs (1)
37row.HeaderCell.Value = $"Row {i++}";