Base:
property
Selected
System.Windows.Forms.DataGridViewBand.Selected
63 writes to Selected
System.Windows.Forms (5)
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (2)
438
_owningDataGridViewRow.
Selected
= true;
445
_owningDataGridViewRow.
Selected
= false;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (3)
130
Owner.OwningRow.
Selected
= true;
234
dataGridViewCell.OwningRow.
Selected
= true;
238
dataGridViewCell.OwningRow.
Selected
= false;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (1)
58
_sampleDataGridViewSelected.Rows[0].
Selected
= true;
System.Windows.Forms.Tests (57)
System\Windows\Forms\DataGridViewCellTests.cs (1)
2085
row.
Selected
= rowSelected;
System\Windows\Forms\DataGridViewHeaderCellTests.cs (3)
1121
row.
Selected
= rowSelected;
1143
row.
Selected
= rowSelected;
1166
row.
Selected
= rowSelected;
System\Windows\Forms\DataGridViewRowTests.cs (15)
2933
Assert.Throws<InvalidOperationException>(() => row.
Selected
= true);
2936
row.
Selected
= false;
2958
row.
Selected
= true;
2963
row.
Selected
= true;
2968
row.
Selected
= false;
2986
row1.
Selected
= true;
2991
row2.
Selected
= true;
2996
row1.
Selected
= false;
3001
row2.
Selected
= false;
3020
row1.
Selected
= true;
3025
row2.
Selected
= true;
3030
row1.
Selected
= false;
3035
row2.
Selected
= false;
3051
Assert.Throws<InvalidOperationException>(() => row.
Selected
= value);
4031
source.
Selected
= true;
System\Windows\Forms\DataGridViewSelectedRowCollectionTests.cs (36)
31
control.Rows[0].
Selected
= true;
32
control.Rows[1].
Selected
= false;
33
control.Rows[2].
Selected
= true;
50
control.Rows[0].
Selected
= true;
51
control.Rows[1].
Selected
= false;
52
control.Rows[2].
Selected
= true;
80
control.Rows[0].
Selected
= true;
81
control.Rows[1].
Selected
= false;
82
control.Rows[2].
Selected
= true;
104
control.Rows[0].
Selected
= true;
105
control.Rows[1].
Selected
= false;
106
control.Rows[2].
Selected
= true;
149
control.Rows[0].
Selected
= true;
150
control.Rows[1].
Selected
= false;
151
control.Rows[2].
Selected
= true;
198
control.Rows[0].
Selected
= true;
199
control.Rows[1].
Selected
= false;
200
control.Rows[2].
Selected
= true;
219
control.Rows[0].
Selected
= true;
220
control.Rows[1].
Selected
= false;
221
control.Rows[2].
Selected
= true;
251
control.Rows[0].
Selected
= true;
252
control.Rows[1].
Selected
= false;
253
control.Rows[2].
Selected
= true;
322
control.Rows[0].
Selected
= true;
323
control.Rows[1].
Selected
= false;
324
control.Rows[2].
Selected
= true;
358
control.Rows[0].
Selected
= true;
359
control.Rows[1].
Selected
= false;
360
control.Rows[2].
Selected
= true;
398
control.Rows[0].
Selected
= true;
399
control.Rows[1].
Selected
= false;
400
control.Rows[2].
Selected
= true;
448
control.Rows[0].
Selected
= true;
449
control.Rows[1].
Selected
= false;
450
control.Rows[2].
Selected
= true;
System\Windows\Forms\DataGridViewTests.cs (2)
3446
_dataGridView.Rows[0].
Selected
= true;
3451
_dataGridView.Rows[1].
Selected
= true;
42 references to Selected
System.Windows.Forms (10)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
11046
if (dataGridViewRow.
Selected
)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
539
if (OwningRow is not null && (OwningRow.DataGridView is null || RowIndex >= 0) && OwningRow.
Selected
)
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (3)
309
throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(
Selected
)));
1163
if (
Selected
)
1170
Debug.Assert(!
Selected
);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
174
if (_owningDataGridViewRow.
Selected
)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (3)
401
if (dataGridViewRow.
Selected
)
1484
if (dataGridViewRow.
Selected
)
1500
Debug.Assert(!dataGridViewRow.
Selected
);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (1)
106
if (Owner.OwningRow is not null && Owner.OwningRow.
Selected
)
System.Windows.Forms.Tests (32)
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (4)
97
Assert.False(cell.OwningRow.
Selected
);
101
Assert.Equal(expected, cell.OwningRow.
Selected
);
116
Assert.False(cell.OwningRow.
Selected
);
120
Assert.False(cell.OwningRow.
Selected
);
System\Windows\Forms\DataGridViewRowTests.cs (28)
44
Assert.False(row.
Selected
);
2914
Assert.False(row.
Selected
);
2926
Assert.Throws<InvalidOperationException>(() => row.
Selected
);
2934
Assert.False(row.
Selected
);
2937
Assert.False(row.
Selected
);
2960
Assert.Equal(selected, row.
Selected
);
2965
Assert.Equal(selected, row.
Selected
);
2970
Assert.False(row.
Selected
);
2988
Assert.True(row1.
Selected
);
2989
Assert.False(row2.
Selected
);
2993
Assert.False(row1.
Selected
);
2994
Assert.True(row2.
Selected
);
2998
Assert.False(row1.
Selected
);
2999
Assert.False(row2.
Selected
);
3003
Assert.False(row1.
Selected
);
3004
Assert.False(row2.
Selected
);
3022
Assert.True(row1.
Selected
);
3023
Assert.False(row2.
Selected
);
3027
Assert.True(row1.
Selected
);
3028
Assert.True(row2.
Selected
);
3032
Assert.False(row1.
Selected
);
3033
Assert.True(row2.
Selected
);
3037
Assert.False(row1.
Selected
);
3038
Assert.False(row2.
Selected
);
3918
Assert.False(row.
Selected
);
3958
Assert.False(row.
Selected
);
4001
Assert.False(row.
Selected
);
4050
Assert.False(row.
Selected
);