Base:
property
State
System.Windows.Forms.DataGridViewElement.State
1 override of State
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewRowTests.cs (1)
5759
public override DataGridViewElementStates
State
=> StateResult;
6 writes to State
System.Windows.Forms (6)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (6)
131
dataGridViewRow.
State
= SharedRowState(index);
140
newDataGridViewRow.
State
= SharedRowState(index);
212
dataGridViewRow.
State
|= DataGridViewElementStates.Visible;
674
dataGridViewRow.
State
= DataGridViewElementStates.None;
1713
dataGridViewRow.
State
= DataGridViewElementStates.None;
2422
SharedRow(rowIndex).
State
= SharedRowState(rowIndex);
51 references to State
System.Windows.Forms (30)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
11079
OnAddingRow(dataGridViewRow, dataGridViewRow.
State
, checkFrozenState: false);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
163
Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).
State
);
265
Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).
State
);
444
Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).
State
);
514
Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).
State
);
546
Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).
State
);
751
Debug.Assert(DataGridView.Rows.GetRowState(RowIndex) == DataGridView.Rows.SharedRow(RowIndex).
State
);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
323
throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(
State
)));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (22)
210
Debug.Assert((dataGridViewRow.
State
& (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0);
233
DataGridViewElementStates rowState = dataGridViewRow.
State
;
264
Debug.Assert(dataGridViewRow.
State
== SharedRowState(index));
350
DataGridViewElementStates rowTemplateState = rowTemplate.
State
;
417
DataGridView.OnAddingRow(dataGridViewRow, dataGridViewRow.
State
, checkFrozenState: true); // will throw an exception if the addition is illegal
440
Debug.Assert((dataGridViewRow.
State
& (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0);
441
_rowStates.Add(dataGridViewRow.
State
);
453
Debug.Assert(dataGridViewRow.
State
== SharedRowState(index));
690
DataGridViewElementStates rowState = rowTemplate.
State
& ~(DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed);
766
Debug.Assert((dataGridViewRow.
State
& (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0);
767
_rowStates.Add(dataGridViewRow.
State
);
774
Debug.Assert(dataGridViewRow.
State
== SharedRowState(index));
1431
DataGridViewElementStates rowTemplateState = rowTemplate.
State
;
1519
DataGridView.OnInsertingRow(rowIndex, dataGridViewRow, dataGridViewRow.
State
, ref newCurrentCell, true, 1, force); // will throw an exception if the insertion is illegal
1541
Debug.Assert((dataGridViewRow.
State
& (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0);
1542
_rowStates.Insert(rowIndex, dataGridViewRow.
State
);
1554
Debug.Assert(dataGridViewRow.
State
== SharedRowState(rowIndex));
1724
DataGridViewElementStates rowState = rowTemplate.
State
& ~(DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed);
1815
Debug.Assert((dataGridViewRow.
State
& (DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed)) == 0);
1816
_rowStates.Insert(rowIndexInserted, dataGridViewRow.
State
);
1825
Debug.Assert(dataGridViewRow.
State
== SharedRowState(rowIndexInserted));
2228
_rowStates[index] = dataGridViewRow.
State
;
System.Windows.Forms.Tests (21)
System\Windows\Forms\DataGridViewRowTests.cs (21)
45
Assert.Equal(DataGridViewElementStates.Visible, row.
State
);
1175
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1180
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1185
Assert.Equal(!value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1201
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1207
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1213
Assert.Equal(!value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1238
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1247
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
1256
Assert.Equal(!value, (row.
State
& DataGridViewElementStates.Frozen) != 0);
2555
Assert.Equal(value, (row.
State
& DataGridViewElementStates.ReadOnly) != 0);
2560
Assert.Equal(value, (row.
State
& DataGridViewElementStates.ReadOnly) != 0);
2565
Assert.Equal(!value, (row.
State
& DataGridViewElementStates.ReadOnly) != 0);
3063
Assert.Equal(DataGridViewElementStates.Visible, row.
State
);
3075
Assert.Throws<InvalidOperationException>(() => row.
State
);
3263
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Visible) != 0);
3268
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Visible) != 0);
3273
Assert.Equal(!value, (row.
State
& DataGridViewElementStates.Visible) != 0);
3289
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Visible) != 0);
3295
Assert.Equal(value, (row.
State
& DataGridViewElementStates.Visible) != 0);
3301
Assert.Equal(!value, (row.
State
& DataGridViewElementStates.Visible) != 0);