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