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