25 types derived from DataGridViewCell
System.Windows.Forms (9)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
15
public partial class DataGridViewButtonCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
15
public partial class DataGridViewCheckBoxCell :
DataGridViewCell
, IDataGridViewEditingCell
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
13
public partial class DataGridViewComboBoxCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ItemComparer.cs (1)
8
public partial class DataGridViewComboBoxCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ObjectCollection.cs (1)
9
public partial class DataGridViewComboBoxCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
12
public partial class DataGridViewHeaderCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
11
public partial class DataGridViewImageCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
10
public partial class DataGridViewLinkCell :
DataGridViewCell
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
12
public partial class DataGridViewTextBoxCell :
DataGridViewCell
System.Windows.Forms.Tests (16)
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (2)
15
public class DataGridViewCellAccessibleObjectTests :
DataGridViewCell
1488
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (1)
2404
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewCellStateChangedEventArgsTests.cs (1)
28
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewCellTests.cs (5)
3415
public class CreateAccessibilityInstanceTests :
DataGridViewCell
3457
private class CustomCreateAccessibilityInstanceDataGridViewCell :
DataGridViewCell
6220
private class CustomFormattedValueType :
DataGridViewCell
6572
private class CustomStateDataGridViewCell :
DataGridViewCell
6579
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (1)
561
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewColumnTests.cs (1)
1811
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewElementTests.cs (1)
382
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewRowTests.cs (2)
5718
private class CantSetDataGridViewCell :
DataGridViewCell
5762
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewSelectedCellCollectionTests.cs (1)
522
private class SubDataGridViewCell :
DataGridViewCell
System\Windows\Forms\DataGridViewTests.cs (1)
2889
private class SubDataGridViewCell :
DataGridViewCell
432 references to DataGridViewCell
PresentationUI (2)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (2)
268
DataGridViewCell
cell = row.Cells[RightsTableColumnToIndex(RightsTableColumn.User)];
380
DataGridViewCell
nameCell = new DataGridViewTextBoxCell
System.Windows.Forms (233)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (12)
1137
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
1697
public
DataGridViewCell
? CurrentCell
1771
private
DataGridViewCell
CurrentCellInternal
1779
DataGridViewCell
dataGridViewCell = dataGridViewRow.Cells[_ptCurrentCell.X];
2275
public
DataGridViewCell
? FirstDisplayedCell
2291
DataGridViewCell
firstDisplayedCell = value;
2916
private bool IsSharedCellReadOnly(
DataGridViewCell
dataGridViewCell, int rowIndex)
2927
internal bool IsSharedCellSelected(
DataGridViewCell
dataGridViewCell, int rowIndex)
2937
internal bool IsSharedCellVisible(
DataGridViewCell
dataGridViewCell, int rowIndex)
3661
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
4003
public
DataGridViewCell
this[int columnIndex, int rowIndex]
4019
public
DataGridViewCell
this[string columnName, int rowIndex]
System\Windows\Forms\Controls\DataGridView\DataGridView.DataGridViewEditingPanelAccessibleObject.cs (1)
45
DataGridViewCell
? currentCell = owner.CurrentCell;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (106)
48
DataGridViewCell
? currentCell = CurrentCell;
376
DataGridViewCell
dataGridViewCell;
455
DataGridViewCell
dataGridViewCell;
2582
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
2612
DataGridViewCell
previousCurrentCell = dataGridViewCell;
2790
private void BuildInheritedColumnHeaderCellStyle(DataGridViewCellStyle inheritedCellStyle,
DataGridViewCell
cell)
3239
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
3303
private bool CanValidateDataBoundDataGridViewCell(
DataGridViewCell
? dataGridViewCurrentCell)
3721
DataGridViewCell
? dataGridViewCurrentCell = CurrentCellInternal;
3749
ref
DataGridViewCell
? dataGridViewCurrentCell,
3981
DataGridViewCell
? dataGridViewCurrentCell = CurrentCellInternal;
4085
DataGridViewCell
? dataGridViewCellTmp = null;
4191
DataGridViewCell
[] cells = new
DataGridViewCell
[Columns.Count - cellsInCollection];
4199
DataGridViewCell
dgvcNew = (
DataGridViewCell
)Columns[columnIndex].CellTemplate!.Clone();
6172
DataGridViewCell
? dataGridViewCurrentCell = CurrentCellInternal;
6887
foreach (
DataGridViewCell
dataGridViewCell in _individualSelectedCells)
6912
DataGridViewCell
dataGridViewCell = dataGridViewRow.Cells[columnIndex];
6929
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
6959
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
6973
DataGridViewCell
dataGridViewCell,
7103
internal
DataGridViewCell
GetCellInternal(int columnIndex, int rowIndex)
7115
return columnIndex >= 0 ? Columns[columnIndex].HeaderCell : (
DataGridViewCell
)TopLeftHeaderCell;
7752
foreach (
DataGridViewCell
dataGridViewCell in _individualSelectedCells)
7866
foreach (
DataGridViewCell
dataGridViewCell in _individualSelectedCells)
9682
private bool InitializeEditingCellValue(ref DataGridViewCellStyle dataGridViewCellStyle, ref
DataGridViewCell
dataGridViewCell)
9721
private bool InitializeEditingControlValue(ref DataGridViewCellStyle dataGridViewCellStyle,
DataGridViewCell
dataGridViewCell)
9760
public void InvalidateCell(
DataGridViewCell
dataGridViewCell)
9772
private void InvalidateCellPrivate(
DataGridViewCell
dataGridViewCell)
10600
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRowDebug.Cells)
10611
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
10812
DataGridViewCell
dataGridViewCellNew = (
DataGridViewCell
)dataGridViewColumn.CellTemplate.Clone();
10964
DataGridViewCell
dataGridViewCellNew = (
DataGridViewCell
)dataGridViewColumn.CellTemplate!.Clone();
11019
DataGridViewCell
dataGridViewCell = dataGridViewRow.Cells[columnIndex];
11548
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
11632
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
11657
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
11673
internal void OnCellContextMenuStripChanged(
DataGridViewCell
dataGridViewCell)
11702
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
11724
internal void OnCellEnter(ref
DataGridViewCell
? dataGridViewCell, int columnIndex, int rowIndex)
11757
internal void OnCellErrorTextChanged(
DataGridViewCell
dataGridViewCell)
11812
internal void OnCellLeave(ref
DataGridViewCell
? dataGridViewCell, int columnIndex, int rowIndex)
11849
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
11870
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
11891
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
12615
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
12638
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
12658
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
12716
DataGridViewCell
dataGridViewCell = GetCellInternal(e.ColumnIndex, e.RowIndex);
12811
DataGridViewCell
dataGridViewCell = e.Cell;
12843
internal void OnCellStyleChanged(
DataGridViewCell
dataGridViewCell)
13023
internal void OnCellToolTipTextChanged(
DataGridViewCell
dataGridViewCell)
13048
internal void OnCellValidated(ref
DataGridViewCell
? dataGridViewCell, int columnIndex, int rowIndex)
13086
ref
DataGridViewCell
? dataGridViewCell,
13091
DataGridViewCell
currentCell = dataGridViewCell ?? CurrentCellInternal;
13723
DataGridViewCell
? dataGridViewCellTmp = null;
14676
if (element is
DataGridViewCell
dataGridViewCell)
14840
if (element is
DataGridViewCell
dataGridViewCell)
15018
DataGridViewCell
? dataGridViewCell = null;
15447
DataGridViewCell
dataGridViewCellNew = (
DataGridViewCell
)dataGridViewColumn.CellTemplate.Clone();
15681
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
15740
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
15774
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
15817
DataGridViewCell
? dataGridViewCell = null;
17244
foreach (
DataGridViewCell
cell in Rows[rowIndexDeleted].Cells)
17377
DataGridViewCell
dataGridViewCell = dataGridViewRow.Cells[columnIndex];
17421
DataGridViewCell
dataGridViewCell = dataGridViewRow.Cells[columnIndex];
17649
ref
DataGridViewCell
? dataGridViewCell,
17974
DataGridViewCell
? dataGridViewCellTmp = null;
18320
private void OnRowLeave(ref
DataGridViewCell
? dataGridViewCell, int columnIndex, int rowIndex)
18720
private bool OnRowValidating(ref
DataGridViewCell
? dataGridViewCell, int columnIndex, int rowIndex)
18762
private void OnRowValidated(ref
DataGridViewCell
? dataGridViewCell, int columnIndex, int rowIndex)
19067
DataGridViewCell
? dataGridViewCellTmp = null;
19346
DataGridViewCell
cell;
19679
DataGridViewCell
cell = TopLeftHeaderCell;
19774
foreach (
DataGridViewCell
dataGridViewCell in newRowCells)
19784
foreach (
DataGridViewCell
dataGridViewCell in newRowCells)
19801
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
21415
DataGridViewCell
? dataGridViewCurrentCell = null;
21880
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
22046
DataGridViewCell
dataGridViewCell = CurrentCell;
25273
DataGridViewCell
dataGridViewCell = CurrentCellInternal;
25291
DataGridViewCell
dataGridViewCurrentCell = CurrentCellInternal;
25341
private bool PushFormattedValue(ref
DataGridViewCell
dataGridViewCurrentCell, object? formattedValue, out Exception? exception)
25476
DataGridViewCell
dataGridViewCurrentCell = CurrentCellInternal;
25610
foreach (
DataGridViewCell
cell in row.Cells)
25642
DataGridViewCell
dataGridViewCell = _individualReadOnlyCells[cellIndex];
25659
DataGridViewCell
dataGridViewCell = _individualReadOnlyCells[cellIndex];
25685
DataGridViewCell
dataGridViewCell = _individualSelectedCells.HeadCell;
25712
DataGridViewCell
dataGridViewCell = _individualSelectedCells.HeadCell;
25745
DataGridViewCell
dataGridViewCell;
25799
DataGridViewCell
dataGridViewCell = _individualSelectedCells[cellIndex];
26640
private
DataGridViewCell
? SelectedCell(int index)
26780
DataGridViewCell
? dataGridViewCellTmp = null;
26805
DataGridViewCell
currentCell;
27023
DataGridViewCell
currentCell = CurrentCellInternal;
27413
DataGridViewCell
dataGridViewCell = _individualSelectedCells.HeadCell;
27478
DataGridViewCell
dataGridViewCell = Rows[rowIndex].Cells[columnIndex];
27495
DataGridViewCell
dataGridViewCellTmp;
27628
DataGridViewCell
dataGridViewCell = Rows[rowIndex].Cells[columnIndex];
27647
DataGridViewCell
dataGridViewCellTmp;
29976
DataGridViewCell
? dataGridViewCell = null;
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
436
foreach (
DataGridViewCell
? dataGridViewCell in ((DataGridViewRow)this).Cells)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellAccessibleObject.cs (1)
13
public DataGridViewButtonCellAccessibleObject(
DataGridViewCell
? owner) : base(owner)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
30
public override
DataGridViewCell
? CellTemplate
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
61
/// Initializes a new instance of the <see cref="
DataGridViewCell
"/> class.
902
internal void CloneInternal(
DataGridViewCell
dataGridViewCell)
940
DataGridViewCell
dataGridViewCell = (
DataGridViewCell
)Activator.CreateInstance(GetType())!;
1287
ScaleHelper.GetIconResourceAsBitmap(typeof(
DataGridViewCell
), bitmapName, new Size(s_iconsWidth, s_iconsHeight));
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (5)
18
private
DataGridViewCell
? _owner;
24
public DataGridViewCellAccessibleObject(
DataGridViewCell
? owner)
68
DataGridViewCell
dataGridViewCell = _owner;
91
public
DataGridViewCell
? Owner
267
DataGridViewCell
dataGridViewCell = _owner;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCancelEventArgs.cs (1)
10
internal DataGridViewCellCancelEventArgs(
DataGridViewCell
dataGridViewCell)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (24)
10
/// Represents a collection of <see cref="
DataGridViewCell
"/> objects in the <see cref="DataGridView"/>
17
private readonly List<
DataGridViewCell
> _items = [];
20
int IList.Add(object? value) => Add((
DataGridViewCell
)value!);
28
void IList.Insert(int index, object? value) => Insert(index, (
DataGridViewCell
)value!);
30
void IList.Remove(object? value) => Remove((
DataGridViewCell
)value!);
41
set { this[index] = (
DataGridViewCell
)value!; }
65
public
DataGridViewCell
this[int index]
70
DataGridViewCell
dataGridViewCell = value.OrThrowIfNull();
84
DataGridViewCell
oldDataGridViewCell = _items[index];
113
public
DataGridViewCell
this[string columnName]
154
/// Adds a <see cref="
DataGridViewCell
"/> to this collection.
156
public virtual int Add(
DataGridViewCell
dataGridViewCell)
171
internal int AddInternal(
DataGridViewCell
dataGridViewCell)
188
public virtual void AddRange(params
DataGridViewCell
[] dataGridViewCells)
197
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewCells)
224
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewCells)
240
foreach (
DataGridViewCell
dataGridViewCell in _items)
249
public void CopyTo(
DataGridViewCell
[] array, int index)
257
public virtual bool Contains(
DataGridViewCell
dataGridViewCell)
263
public int IndexOf(
DataGridViewCell
dataGridViewCell) => _items.IndexOf(dataGridViewCell);
265
public virtual void Insert(int index,
DataGridViewCell
dataGridViewCell)
284
internal void InsertInternal(int index,
DataGridViewCell
dataGridViewCell)
303
public virtual void Remove(
DataGridViewCell
cell)
343
DataGridViewCell
dataGridViewCell = _items[index];
System\Windows\Forms\Controls\DataGridView\DataGridViewCellConverter.cs (1)
28
if (destinationType == typeof(InstanceDescriptor) && value is
DataGridViewCell
cell)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellEventArgs.cs (1)
8
internal DataGridViewCellEventArgs(
DataGridViewCell
dataGridViewCell)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellLinkedList.cs (6)
9
/// Represents a linked list of <see cref="
DataGridViewCell
"/> objects
25
public
DataGridViewCell
this[int index]
61
public
DataGridViewCell
HeadCell
70
public void Add(
DataGridViewCell
dataGridViewCell)
96
public bool Contains(
DataGridViewCell
dataGridViewCell)
117
public bool Remove(
DataGridViewCell
dataGridViewCell)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellLinkedListElement.cs (3)
11
private readonly
DataGridViewCell
_dataGridViewCell;
13
public DataGridViewCellLinkedListElement(
DataGridViewCell
dataGridViewCell)
19
public
DataGridViewCell
DataGridViewCell => _dataGridViewCell;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStateChangedEventArgs.cs (2)
8
public DataGridViewCellStateChangedEventArgs(
DataGridViewCell
dataGridViewCell, DataGridViewElementStates stateChanged)
14
public
DataGridViewCell
Cell { get; }
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject.cs (1)
15
public DataGridViewCheckBoxCellAccessibleObject(
DataGridViewCell
? owner) : base(owner)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
31
public override
DataGridViewCell
? CellTemplate
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (3)
49
public DataGridViewColumn(
DataGridViewCell
? cellTemplate)
157
public virtual
DataGridViewCell
? CellTemplate { get; set; }
829
dataGridViewColumn.CellTemplate = (
DataGridViewCell
?)CellTemplate?.Clone();
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellAccessibleObject.cs (1)
15
public DataGridViewComboBoxCellAccessibleObject(
DataGridViewCell
? owner) : base(owner)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (1)
67
public override
DataGridViewCell
? CellTemplate
System\Windows\Forms\Controls\DataGridView\DataGridViewElement.cs (1)
26
GetType() == typeof(DataGridViewRow) || GetType() == typeof(
DataGridViewCell
) ||
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.DataGridViewImageCellAccessibleObject.cs (1)
13
public DataGridViewImageCellAccessibleObject(
DataGridViewCell
? owner) : base(owner)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
38
public override
DataGridViewCell
? CellTemplate
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.DataGridViewLinkCellAccessibleObject.cs (1)
13
public DataGridViewLinkCellAccessibleObject(
DataGridViewCell
? owner) : base(owner)
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (1)
78
public override
DataGridViewCell
? CellTemplate
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (12)
1080
DataGridViewCell
[] cells = new
DataGridViewCell
[cellsCount];
1083
DataGridViewCell
dataGridViewCell = rowTemplate.Cells[i];
1084
DataGridViewCell
dgvcNew = (
DataGridViewCell
)dataGridViewCell.Clone();
1117
DataGridViewCell
dgvcNew = (
DataGridViewCell
)dataGridViewColumn.CellTemplate.Clone();
1154
foreach (
DataGridViewCell
dataGridViewCell in Cells)
1312
foreach (
DataGridViewCell
dataGridViewCell in Cells)
1510
DataGridViewCell
cell;
1750
internal void SetReadOnlyCellCore(
DataGridViewCell
dataGridViewCell, bool readOnly)
1757
foreach (
DataGridViewCell
dataGridViewCellTmp in Cells)
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewSelectedRowCellsAccessibleObject.cs (1)
86
DataGridViewCell
? currentCell = _owningDataGridViewRow.DataGridView?.CurrentCell;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (16)
143
foreach (
DataGridViewCell
dataGridViewCell in newDataGridViewRow.Cells)
213
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
238
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
354
foreach (
DataGridViewCell
dataGridViewCell in rowTemplate.Cells)
420
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
678
foreach (
DataGridViewCell
dataGridViewCell in dgvcc)
750
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
1435
foreach (
DataGridViewCell
dataGridViewCell in rowTemplate.Cells)
1522
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
1717
foreach (
DataGridViewCell
dataGridViewCell in dgvcc)
1796
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewRow.Cells)
2181
foreach (
DataGridViewCell
cell in row.Cells)
2246
foreach (
DataGridViewCell
dataGridViewCell in cells)
2271
foreach (
DataGridViewCell
dataGridViewCell in cells)
2405
DataGridViewCell
dataGridViewCell1 = dataGridViewRow1.Cells[columnIndex];
2406
DataGridViewCell
dataGridViewCell2 = dataGridViewRow2.Cells[columnIndex];
System\Windows\Forms\Controls\DataGridView\DataGridViewSelectedCellCollection.cs (10)
10
/// Represents a collection of selected <see cref="
DataGridViewCell
"/> objects in the <see cref="DataGridView"/>
16
private readonly List<
DataGridViewCell
> _items = [];
79
public
DataGridViewCell
this[int index]
88
/// Adds a <see cref="
DataGridViewCell
"/> to this collection.
90
internal int Add(
DataGridViewCell
dataGridViewCell)
97
/// Adds all the <see cref="
DataGridViewCell
"/> objects from the provided linked list to this collection.
102
foreach (
DataGridViewCell
dataGridViewCell in dataGridViewCells)
118
public bool Contains(
DataGridViewCell
dataGridViewCell) => ((IList)_items).Contains(dataGridViewCell);
120
public void CopyTo(
DataGridViewCell
[] array, int index) => _items.CopyTo(array, index);
123
public void Insert(int index,
DataGridViewCell
dataGridViewCell)
System\Windows\Forms\Controls\DataGridView\DataGridViewSelectedColumnCollection.cs (1)
72
/// Adds a <see cref="
DataGridViewCell
"/> to this collection.
System\Windows\Forms\Controls\DataGridView\DataGridViewSelectedRowCollection.cs (2)
10
/// Represents a collection of selected <see cref="
DataGridViewCell
"/> objects in the <see cref="DataGridView"/>
61
/// Adds a <see cref="
DataGridViewCell
"/> to this collection.
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.DataGridViewTextBoxCellAccessibleObject.cs (1)
13
public DataGridViewTextBoxCellAccessibleObject(
DataGridViewCell
? owner) : base(owner)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxColumn.cs (1)
21
public override
DataGridViewCell
? CellTemplate
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (7)
162
DataGridViewFreeDimension freeDimension =
DataGridViewCell
.GetFreeDimensionFromConstraint(constraintSize);
176
preferredWidth =
DataGridViewCell
.MeasureTextWidth(graphics, val, cellStyle.Font!, maxHeight, flags);
180
preferredWidth =
DataGridViewCell
.MeasureTextSize(graphics, val, cellStyle.Font!, flags).Width;
237
minHeightContent =
DataGridViewCell
.MeasureTextHeight(graphics, val, cellStyle.Font!, allowedWidth, flags);
241
minHeightContent =
DataGridViewCell
.MeasureTextSize(graphics, val, cellStyle.Font!, flags).Height;
264
preferredSize =
DataGridViewCell
.MeasureTextPreferredSize(graphics, val, cellStyle.Font!, 5.0F, flags);
268
preferredSize =
DataGridViewCell
.MeasureTextSize(graphics, val, cellStyle.Font!, flags);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
348
public DialogDataGridViewCellAccessibleObject(
DataGridViewCell
owner) : base(owner)
System.Windows.Forms.Tests (196)
System\Windows\Forms\AccessibleObjects\DataGridView.DataGridViewEditingPanelAccessibleObjectTests.cs (1)
34
DataGridViewCell
cell = dataGridView.Rows[0].Cells[0];
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (4)
209
DataGridViewCell
cell = dataGridView.Rows[0].Cells[0];
393
foreach (
DataGridViewCell
cell in row.Cells)
418
foreach (
DataGridViewCell
cell in row.Cells)
443
foreach (
DataGridViewCell
cell in row.Cells)
System\Windows\Forms\AccessibleObjects\DataGridViewButtonCellAccessibleObjectTests.cs (1)
65
using
DataGridViewCell
cell = new DataGridViewButtonCell();
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (11)
98
public void DataGridViewCellAccessibleObject_Ctor_DataGridViewCell(
DataGridViewCell
owner)
469
Mock<
DataGridViewCell
> mockCell = new(MockBehavior.Strict);
480
var
mockObj = mockCell.Object;
502
Mock<
DataGridViewCell
> mockCell = new(MockBehavior.Strict);
516
var
mockObj = mockCell.Object;
535
Mock<
DataGridViewCell
> mockCell = new(MockBehavior.Strict);
552
var
mockObj = mockCell.Object;
574
Mock<
DataGridViewCell
> mockCell = new(MockBehavior.Strict);
608
Mock<
DataGridViewCell
> mockCell = new(MockBehavior.Strict);
656
foreach (
DataGridViewCell
cell in row.Cells)
1496
public new
DataGridViewCell
CurrentCell { get; set; }
System\Windows\Forms\AccessibleObjects\DataGridViewCheckBoxCellAccessibleObjectTests.cs (6)
33
var
cell = control.Rows[0].Cells[0];
77
var
cell = control.Rows[0].Cells[0];
136
var
cell = control.Rows[0].Cells[0];
160
var
cell = control.Rows[0].Cells[0];
215
var
cell = control.Rows[0].Cells[0];
259
DataGridViewCell
cell = dataGridView.Rows[0].Cells[0];
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedCellsAccessibleObjectTests.cs (5)
82
DataGridViewCell
currentCell = control.Rows[0].Cells[0];
100
DataGridViewCell
currentCell = control.Rows[0].Cells[0];
144
DataGridViewCell
selecetedCell1 = control.Rows[0].Cells[0];
181
DataGridViewCell
selecetedCell1 = control.Rows[0].Cells[0];
201
DataGridViewCell
selecetedCell1 = control.Rows[0].Cells[0];
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedRowCellsAccessibleObjectTests.cs (5)
85
DataGridViewCell
currentCell = control.Rows[0].Cells[0];
103
DataGridViewCell
currentCell = control.Rows[0].Cells[0];
150
DataGridViewCell
selecetedCell1 = row.Cells[0];
189
DataGridViewCell
selecetedCell1 = row.Cells[0];
210
DataGridViewCell
selecetedCell1 = row.Cells[0];
System\Windows\Forms\DataGridViewCellErrorTextNeededEventArgsTests.cs (1)
19
DataGridViewCell
cell = dataGridView.Rows[0].Cells[0];
System\Windows\Forms\DataGridViewCellTests.cs (115)
150
DataGridViewCell
cell = control.Rows[0].Cells[0];
168
DataGridViewCell
cell = control.Rows[0].Cells[0];
205
DataGridViewCell
cell = control.Rows[0].Cells[0];
286
DataGridViewCell
cell = control.Rows[0].Cells[0];
308
DataGridViewCell
cell = control.Rows[0].Cells[0];
444
DataGridViewCell
cell = row.Cells[0];
486
DataGridViewCell
cell = row.Cells[0];
519
DataGridViewCell
cell = row.Cells[0];
580
DataGridViewCell
cell = row.Cells[0];
645
DataGridViewCell
cell = control.Rows[0].Cells[0];
660
DataGridViewCell
cell = control.Rows[0].Cells[0];
676
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
761
DataGridViewCell
cell = control.Rows[0].Cells[0];
775
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
788
DataGridViewCell
cell = control.Rows[0].Cells[0];
820
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
849
DataGridViewCell
cell = control.Rows[0].Cells[0];
885
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1014
DataGridViewCell
cell = control.Rows[0].Cells[0];
1041
DataGridViewCell
cell = control.Rows[0].Cells[0];
1069
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1096
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1126
DataGridViewCell
cell = control.Rows[0].Cells[0];
1169
DataGridViewCell
cell = control.Rows[0].Cells[0];
1209
DataGridViewCell
cell = control.Rows[0].Cells[0];
1293
DataGridViewCell
cell = control.Rows[0].Cells[0];
1308
DataGridViewCell
cell = control.Rows[0].Cells[0];
1324
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1385
DataGridViewCell
cell = row.Cells[0];
1403
DataGridViewCell
cell = row.Cells[0];
1472
DataGridViewCell
cell = control.Rows[0].Cells[0];
1490
DataGridViewCell
cell = row.Cells[0];
1504
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1561
DataGridViewCell
cell = control.Rows[0].Cells[0];
1575
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1630
DataGridViewCell
cell = row.Cells[0];
1654
DataGridViewCell
cell = row.Cells[0];
1789
DataGridViewCell
cell = row.Cells[0];
1835
DataGridViewCell
cell = row.Cells[0];
1886
DataGridViewCell
cell1 = row.Cells[0];
1887
DataGridViewCell
cell2 = row.Cells[1];
1923
DataGridViewCell
cell = control.Rows[0].Cells[0];
1968
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
2024
DataGridViewCell
cell = row.Cells[0];
2042
DataGridViewCell
cell = row.Cells[0];
2087
DataGridViewCell
cell = row.Cells[0];
2105
DataGridViewCell
cell = row.Cells[0];
2158
DataGridViewCell
cell = control.Rows[0].Cells[0];
2189
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
2206
DataGridViewCell
cell = control.Rows[0].Cells[0];
2384
DataGridViewCell
cell = control.Rows[0].Cells[0];
2411
DataGridViewCell
cell = control.Rows[0].Cells[0];
2434
DataGridViewCell
cell = control.Rows[0].Cells[0];
2558
DataGridViewCell
cell = control.Rows[0].Cells[0];
2572
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
2688
DataGridViewCell
cell = control.Rows[0].Cells[0];
2711
DataGridViewCell
cell = control.Rows[0].Cells[0];
2735
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
2758
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
2805
DataGridViewCell
cell = control.Rows[0].Cells[0];
2941
DataGridViewCell
cell = control.Rows[0].Cells[0];
2966
DataGridViewCell
cell = control.Rows[0].Cells[0];
3043
DataGridViewCell
cell = row.Cells[0];
3062
DataGridViewCell
cell = row.Cells[0];
3746
DataGridViewCell
cell = control.Rows[0].Cells[0];
3763
DataGridViewCell
cell = control.Rows[0].Cells[0];
3781
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
4261
DataGridViewCell
cell = control.Rows[0].Cells[0];
4284
DataGridViewCell
cell = control.Rows[0].Cells[0];
4304
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
4322
DataGridViewCell
cell = control.Rows[0].Cells[0];
4359
DataGridViewCell
cell = control.Rows[0].Cells[0];
4395
DataGridViewCell
cell = control.Rows[0].Cells[0];
4412
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
4461
DataGridViewCell
cell = control.Rows[0].Cells[0];
4510
DataGridViewCell
cell = row.Cells[0];
4532
DataGridViewCell
cell = control.Rows[0].Cells[0];
4592
DataGridViewCell
cell = row.Cells[0];
4614
DataGridViewCell
cell = row.Cells[0];
4628
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
4676
DataGridViewCell
cell = control.Rows[0].Cells[0];
4693
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
4742
DataGridViewCell
cell = control.Rows[0].Cells[0];
4757
var
cell = dataGridView.Rows[0].Cells[0];
5256
int height =
DataGridViewCell
.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 10, TextFormatFlags.Default);
5259
height =
DataGridViewCell
.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 10, TextFormatFlags.Default, out bool widthTruncated);
5271
int height =
DataGridViewCell
.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 20, TextFormatFlags.Default);
5274
height =
DataGridViewCell
.MeasureTextHeight(graphics, text, SystemFonts.DefaultFont, 20, TextFormatFlags.Default, out bool widthTruncated);
5283
Assert.Throws<ArgumentNullException>("graphics", () =>
DataGridViewCell
.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5284
Assert.Throws<ArgumentNullException>("graphics", () =>
DataGridViewCell
.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default, out widthTruncated));
5294
Assert.Throws<ArgumentNullException>("font", () =>
DataGridViewCell
.MeasureTextHeight(graphics, "text", null, 10, TextFormatFlags.Default));
5295
Assert.Throws<ArgumentNullException>("font", () =>
DataGridViewCell
.MeasureTextHeight(graphics, "text", null, 10, TextFormatFlags.Default, out widthTruncated));
5307
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () =>
DataGridViewCell
.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, maxWidth, TextFormatFlags.Default));
5308
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () =>
DataGridViewCell
.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, maxWidth, TextFormatFlags.Default, out widthTruncated));
5319
Assert.Throws<InvalidEnumArgumentException>("flags", () =>
DataGridViewCell
.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags));
5320
Assert.Throws<InvalidEnumArgumentException>("flags", () =>
DataGridViewCell
.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags, out widthTruncated));
5330
Assert.Equal(Size.Empty,
DataGridViewCell
.MeasureTextPreferredSize(graphics, text, SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default));
5344
Assert.NotEqual(Size.Empty,
DataGridViewCell
.MeasureTextPreferredSize(graphics, text, SystemFonts.DefaultFont, 0.2f, flags));
5350
Assert.Throws<ArgumentNullException>("graphics", () =>
DataGridViewCell
.MeasureTextPreferredSize(null, "text", SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default));
5358
Assert.Throws<ArgumentNullException>("font", () =>
DataGridViewCell
.MeasureTextPreferredSize(graphics, "text", null, 0.2f, TextFormatFlags.Default));
5368
Assert.Throws<ArgumentOutOfRangeException>("maxRatio", () =>
DataGridViewCell
.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, maxRatio, TextFormatFlags.Default));
5377
Assert.Throws<InvalidEnumArgumentException>("flags", () =>
DataGridViewCell
.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, 0.2f, flags));
5386
Assert.Equal(Size.Empty,
DataGridViewCell
.MeasureTextSize(graphics, text, SystemFonts.DefaultFont, TextFormatFlags.Default));
5400
Assert.NotEqual(Size.Empty,
DataGridViewCell
.MeasureTextSize(graphics, text, SystemFonts.DefaultFont, flags));
5406
Assert.Throws<ArgumentNullException>("graphics", () =>
DataGridViewCell
.MeasureTextSize(null, "text", SystemFonts.DefaultFont, TextFormatFlags.Default));
5414
Assert.Throws<ArgumentNullException>("font", () =>
DataGridViewCell
.MeasureTextSize(graphics, "text", null, TextFormatFlags.Default));
5423
Assert.Throws<InvalidEnumArgumentException>("flags", () =>
DataGridViewCell
.MeasureTextSize(graphics, "text", SystemFonts.DefaultFont, flags));
5432
Assert.Equal(0,
DataGridViewCell
.MeasureTextWidth(graphics, text, SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5446
Assert.NotEqual(0,
DataGridViewCell
.MeasureTextWidth(graphics, text, SystemFonts.DefaultFont, 10, flags));
5452
Assert.Throws<ArgumentNullException>("graphics", () =>
DataGridViewCell
.MeasureTextWidth(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5460
Assert.Throws<ArgumentNullException>("font", () =>
DataGridViewCell
.MeasureTextWidth(graphics, "text", null, 10, TextFormatFlags.Default));
5470
Assert.Throws<ArgumentOutOfRangeException>("maxHeight", () =>
DataGridViewCell
.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, maxHeight, TextFormatFlags.Default));
5479
Assert.Throws<InvalidEnumArgumentException>("flags", () =>
DataGridViewCell
.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, 10, flags));
6191
yield return new object[] { typeof(
DataGridViewCell
), typeof(DataGridViewCellTests), new DataGridViewCellTests(), new DataGridViewCellStyle(), null, null };
6421
DataGridViewCell
cell = control.Rows[0].Cells[0];
System\Windows\Forms\DataGridViewColumnTests.cs (3)
64
public void DataGridViewColumn_Ctor_DataGridViewCell(
DataGridViewCell
cellTemplate)
504
public void DataGridViewColumn_CellTemplate_Set_GetReturnsExpected(
DataGridViewCell
value)
1821
public SubDataGridViewColumn(
DataGridViewCell
cellTemplate) : base(cellTemplate)
System\Windows\Forms\DataGridViewElementTests.cs (3)
38
type == typeof(DataGridViewBand) || type == typeof(
DataGridViewCell
) ||
39
type.IsSubclassOf(typeof(DataGridViewBand)) || type.IsSubclassOf(typeof(
DataGridViewCell
))))
372
type == typeof(DataGridViewRow) || type == typeof(
DataGridViewCell
) || type == typeof(DataGridViewButtonCell) ||
System\Windows\Forms\DataGridViewHeaderCellTests.cs (34)
132
DataGridViewCell
cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]);
253
DataGridViewCell
cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]);
294
DataGridViewCell
cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]);
432
DataGridViewCell
cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]);
505
DataGridViewCell
cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]);
541
DataGridViewCell
cell = Assert.IsType<DataGridViewHeaderCell>(row.Cells[0]);
630
DataGridViewCell
cell = row.Cells[0];
714
DataGridViewCell
cell = row.Cells[0];
772
DataGridViewCell
cell = control.Rows[0].Cells[0];
842
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
942
DataGridViewCell
cell = row.Cells[0];
1060
DataGridViewCell
cell = row.Cells[0];
1123
DataGridViewCell
cell = row.Cells[0];
1199
DataGridViewCell
cell = row.Cells[0];
1259
DataGridViewCell
cell = control.Rows[0].Cells[0];
1331
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
1381
DataGridViewCell
cell = control.Rows[0].Cells[0];
1615
DataGridViewCell
cell = control.Rows[0].Cells[0];
1642
DataGridViewCell
cell = control.Rows[0].Cells[0];
1914
DataGridViewCell
cell = row.Cells[0];
2012
DataGridViewCell
cell = row.Cells[0];
2282
DataGridViewCell
cell = control.Rows[0].Cells[0];
2305
DataGridViewCell
cell = control.Rows[0].Cells[0];
2363
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
2381
DataGridViewCell
cell = control.Rows[0].Cells[0];
2418
DataGridViewCell
cell = control.Rows[0].Cells[0];
2513
DataGridViewCell
cell = control.Rows[0].Cells[0];
2562
DataGridViewCell
cell = row.Cells[0];
2729
DataGridViewCell
cell = control.Rows[0].Cells[0];
2789
DataGridViewCell
cell = row.Cells[0];
3004
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
3054
DataGridViewCell
cell = control.Rows[0].Cells[0];
3120
DataGridViewCell
cell = control.Rows.SharedRow(0).Cells[0];
4660
DataGridViewCell
cell = control.Rows[0].Cells[0];
System\Windows\Forms\DataGridViewRowTests.cs (5)
4076
Assert.Null(Assert.Single(row.Cells.Cast<
DataGridViewCell
>()).Value);
4106
Assert.Equal(expectedValue, Assert.Single(row.Cells.Cast<
DataGridViewCell
>()).Value);
5690
Assert.Equal(expectedValue, Assert.Single(row.Cells.Cast<
DataGridViewCell
>()).Value);
5706
Assert.Equal(expectedValue, Assert.Single(row.Cells.Cast<
DataGridViewCell
>()).Value);
5715
Assert.Null(Assert.Single(row.Cells.Cast<
DataGridViewCell
>()).Value);
System\Windows\Forms\DataGridViewSelectedCellCollectionTests.cs (2)
128
public void DataGridViewSelectedCellCollection_Contains_InvokeEmpty_ReturnsFalse(
DataGridViewCell
dataGridViewCell)
175
public void DataGridViewSelectedCellCollection_Insert_Invoke_ThrowsNotSupportedException(int index,
DataGridViewCell
dataGridViewCell)