167 references to Selected
System.Windows.Forms (167)
winforms\Managed\System\WinForms\DataGridView.cs (3)
2306
GetCellCount(DataGridViewElementStates.
Selected
) == 1 &&
3743
return (rowState & DataGridViewElementStates.
Selected
) != 0 ||
3745
dataGridViewCell.StateIncludes(DataGridViewElementStates.
Selected
);
winforms\Managed\System\WinForms\DataGridViewBand.cs (5)
685
return (this.State & DataGridViewElementStates.
Selected
) != 0;
727
this.StateInternal = this.State | DataGridViewElementStates.
Selected
;
731
this.StateInternal = this.State & ~DataGridViewElementStates.
Selected
;
735
OnStateChanged(DataGridViewElementStates.
Selected
);
910
dataGridViewBand.StateInternal = this.State & ~(DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (1)
713
bool cellSelected = (elementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewCell.cs (9)
702
if ((this.State & DataGridViewElementStates.
Selected
) != 0)
746
this.StateInternal = this.State | DataGridViewElementStates.
Selected
;
750
this.StateInternal = this.State & ~DataGridViewElementStates.
Selected
;
754
this.DataGridView.OnDataGridViewElementStateChanged(this, -1, DataGridViewElementStates.
Selected
);
1120
DataGridViewElementStates orFlags = DataGridViewElementStates.ReadOnly | DataGridViewElementStates.Resizable | DataGridViewElementStates.
Selected
;
1164
dataGridViewCell.StateInternal = this.State & ~DataGridViewElementStates.
Selected
;
2076
state |= (this.owningRow.GetState(-1) & (DataGridViewElementStates.Frozen | DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible));
2101
state |= (rowEffectiveState & (DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
));
2102
state |= (this.owningColumn.State & (DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
));
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1177
bool cellSelected = (elementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewColumnCollection.cs (20)
527
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
542
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
565
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
588
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) == 0);
641
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) == 0);
658
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
706
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
741
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
746
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
778
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
783
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
820
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
825
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
892
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
897
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1008
includeFilter == DataGridViewElementStates.
Selected
||
1018
else if (includeFilter == DataGridViewElementStates.
Selected
)
1037
includeFilter == DataGridViewElementStates.
Selected
||
1235
if ((columnStates & (DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
)) == (DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
))
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (1)
799
bool cellSelected = (dataGridViewElementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (3)
1515
if ((GetInheritedState(rowIndex) & DataGridViewElementStates.
Selected
) == DataGridViewElementStates.
Selected
)
2155
bool cellSelected = (elementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewHeaderCell.cs (1)
655
bool cellSelected = (dataGridViewElementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (1)
840
bool cellSelected = (elementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (1)
1018
bool cellSelected = (cellState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (74)
1463
((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) != 0));
1464
if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) == 0)
6913
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
6921
if ((includeFilter & DataGridViewElementStates.
Selected
) == DataGridViewElementStates.
Selected
)
6923
if (includeFilter == DataGridViewElementStates.
Selected
)
7235
if (this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
) == 0)
7242
includeColumnHeaders = (this.Rows.GetFirstRow(DataGridViewElementStates.Visible, DataGridViewElementStates.
Selected
) == -1);
7371
int rowIndex = this.Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
);
7373
int nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
);
7479
nextRowIndex = this.Rows.GetNextRow(rowIndex, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
);
7497
if (this.Columns.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
) == 0)
7505
includeRowHeaders = (this.Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.
Selected
) == null);
7541
DataGridViewColumn lastDataGridViewColumn = this.Columns.GetLastColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7546
prevDataGridViewColumn = this.Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7560
prevDataGridViewColumn = this.Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7589
dataGridViewColumn = this.Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
);
7608
nextDataGridViewColumn = this.Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7622
nextDataGridViewColumn = this.Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7649
DataGridViewColumn lastDataGridViewColumn = this.Columns.GetLastColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7655
prevDataGridViewColumn = this.Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7669
prevDataGridViewColumn = this.Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7700
dataGridViewColumn = this.Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
);
7720
nextDataGridViewColumn = this.Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7734
nextDataGridViewColumn = this.Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
, DataGridViewElementStates.None);
7776
selectedVisibleRowExists = this.Rows.GetRowCount(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
) != 0;
7781
selectedVisibleColumnExists = this.Columns.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
) != 0;
12728
((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) != 0))
12739
this.ptAnchorCell.Y > -1 && (this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.
Selected
) != 0)
12792
else if ((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) == 0)
12795
((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) != 0));
12812
(((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) != 0) ||
13169
if (e.StateChanged == DataGridViewElementStates.
Selected
)
14791
case DataGridViewElementStates.
Selected
:
15169
if ((elementState & DataGridViewElementStates.
Selected
) == DataGridViewElementStates.
Selected
)
18426
((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) != 0))
18517
(this.Rows.GetRowState(this.ptAnchorCell.Y) & DataGridViewElementStates.
Selected
) != 0)
18578
else if ((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) == 0)
18581
((this.Rows.GetRowState(hti.row) & DataGridViewElementStates.
Selected
) != 0));
19118
case DataGridViewElementStates.
Selected
:
21212
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21243
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21291
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21346
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21433
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21629
(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21645
(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
21661
(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
22083
(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
22099
(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
22115
(this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
23420
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
23442
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
23659
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
23681
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
24521
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) == 0)
25158
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
25185
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
25225
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
25271
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
25344
if ((this.Rows.GetRowState(this.ptCurrentCell.Y) & DataGridViewElementStates.
Selected
) != 0)
26677
if ((rowState & DataGridViewElementStates.
Selected
) == 0)
27374
if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) == 0)
27651
if ((rowState & DataGridViewElementStates.
Selected
) == 0 &&
27660
if ((dataGridViewCell.State & DataGridViewElementStates.
Selected
) != 0)
27714
this.Rows.SetRowState(rowIndex, DataGridViewElementStates.
Selected
, false);
27878
if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) == 0)
27881
((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) != 0));
27887
if ((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) != 0)
27890
((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.
Selected
) != 0));
28077
if (((rowState & DataGridViewElementStates.
Selected
) != 0) != selected)
28087
this.Rows.SetRowState(rowIndex, DataGridViewElementStates.
Selected
, true);
28094
this.Rows.SetRowState(rowIndex, DataGridViewElementStates.
Selected
, false);
winforms\Managed\System\WinForms\DataGridViewRow.cs (2)
1292
if (cellsPaintSelectionBackground && (rowState & DataGridViewElementStates.
Selected
) != 0)
1465
return (GetState(rowIndex) & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewRowCollection.cs (37)
358
Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
401
Debug.Assert((rowState & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
518
Debug.Assert((rowTemplateState & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
604
Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
636
return AddCopyInternal(indexSource, DataGridViewElementStates.None, DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed, false /*newRow*/);
716
return AddCopiesInternal(indexSource, count, DataGridViewElementStates.None, DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed);
835
DataGridViewElementStates rowState = rowTemplate.State & ~(DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed);
912
Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
1028
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1049
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
1074
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1079
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1100
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
1120
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1141
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
1176
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1203
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1208
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1229
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1256
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1261
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1282
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1305
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
1330
case DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
:
1358
DataGridViewElementStates.ReadOnly | DataGridViewElementStates.
Selected
| DataGridViewElementStates.Visible)) != 0)
1561
Debug.Assert((rowTemplateState & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
1669
Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
1735
DataGridViewElementStates rowTemplateState = GetRowState(indexSource) & ~(DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed);
1849
DataGridViewElementStates rowState = rowTemplate.State & ~(DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed);
1943
Debug.Assert((dataGridViewRow.State & (DataGridViewElementStates.
Selected
| DataGridViewElementStates.Displayed)) == 0);
1966
includeFilter == DataGridViewElementStates.
Selected
||
1980
else if (includeFilter == DataGridViewElementStates.
Selected
)
2001
includeFilter == DataGridViewElementStates.
Selected
||
2398
Debug.Assert(state == DataGridViewElementStates.Displayed || state == DataGridViewElementStates.
Selected
|| state == DataGridViewElementStates.ReadOnly || state == DataGridViewElementStates.Resizable || state == DataGridViewElementStates.Frozen || state == DataGridViewElementStates.Visible);
2433
case DataGridViewElementStates.
Selected
:
2574
if ((rowStates & (DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
)) == (DataGridViewElementStates.Visible | DataGridViewElementStates.
Selected
))
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (1)
791
bool cellSelected = (dataGridViewElementState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewSelectedCellsAccessibleObject.cs (5)
66
if (index >= 0 && index < this.owner.GetCellCount(DataGridViewElementStates.
Selected
))
78
return this.owner.GetCellCount(DataGridViewElementStates.
Selected
);
104
if (this.owner.GetCellCount(DataGridViewElementStates.
Selected
) > 0)
113
if (this.owner.GetCellCount(DataGridViewElementStates.
Selected
) > 0)
115
return this.owner.SelectedCell(this.owner.GetCellCount(DataGridViewElementStates.
Selected
) - 1).AccessibilityObject;
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (1)
706
bool cellSelected = (cellState & DataGridViewElementStates.
Selected
) != 0;
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (1)
280
bool cellSelected = (cellState & DataGridViewElementStates.
Selected
) != 0;