1 write to _selectedBandIndexes
System.Windows.Forms (1)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
420
_selectedBandIndexes
= [];
167 references to _selectedBandIndexes
System.Windows.Forms (167)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
3645
foreach (int columnIndex in
_selectedBandIndexes
)
3664
foreach (int rowIndex in
_selectedBandIndexes
)
3700
foreach (int columnIndex in
_selectedBandIndexes
)
3726
foreach (int rowIndex in
_selectedBandIndexes
)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (163)
1432
allCellsSelected =
_selectedBandIndexes
.Count * Rows.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count;
1442
if (!
_selectedBandIndexes
.Contains(dataGridViewColumn.Index))
1468
allCellsSelected =
_selectedBandIndexes
.Count * Columns.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count;
1479
Debug.Assert(
_selectedBandIndexes
.Contains(rowIndex) ==
3392
if (
_selectedBandIndexes
.Count > BulkPaintThreshold || _individualSelectedCells.Count > BulkPaintThreshold)
3413
while (
_selectedBandIndexes
.Count > 0)
3415
SetSelectedRowCore(
_selectedBandIndexes
.HeadInt, false);
3430
while (
_selectedBandIndexes
.Count > 0)
3432
SetSelectedColumnCore(
_selectedBandIndexes
.HeadInt, false);
3503
if (
_selectedBandIndexes
.Count > BulkPaintThreshold || _individualSelectedCells.Count > BulkPaintThreshold)
3525
while (bandIndex <
_selectedBandIndexes
.Count)
3527
if (
_selectedBandIndexes
[bandIndex] != rowIndexException)
3530
SetSelectedRowCore(
_selectedBandIndexes
[bandIndex], false);
3550
while (bandIndex <
_selectedBandIndexes
.Count)
3552
if (
_selectedBandIndexes
[bandIndex] != columnIndexException)
3555
SetSelectedColumnCore(
_selectedBandIndexes
[bandIndex], false);
6867
return cellCount +
_selectedBandIndexes
.Count * Rows.Count;
6873
return cellCount +
_selectedBandIndexes
.Count * Columns.Count;
6907
foreach (int columnIndex in
_selectedBandIndexes
)
6923
foreach (int rowIndex in
_selectedBandIndexes
)
7817
foreach (int rowIndex in
_selectedBandIndexes
)
7842
foreach (int columnIndex in
_selectedBandIndexes
)
12211
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
12214
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
12222
while (bandIndex <
_selectedBandIndexes
.Count)
12224
if (
_selectedBandIndexes
[bandIndex] != hti._col)
12227
SetSelectedColumnCore(
_selectedBandIndexes
[bandIndex], false);
12260
else if (!
_selectedBandIndexes
.Contains(hti._col))
12267
Debug.Assert(
_selectedBandIndexes
.Contains(hti._col));
12294
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
12295
if (
_selectedBandIndexes
.Count > 0)
12297
SetSelectedColumnCore(
_selectedBandIndexes
.HeadInt, false);
12311
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
12319
while (
_selectedBandIndexes
.Count > 0)
12321
SetSelectedColumnCore(
_selectedBandIndexes
.HeadInt, false);
12367
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
12368
if (
_selectedBandIndexes
.Count > 0)
12370
SetSelectedColumnCore(
_selectedBandIndexes
.HeadInt, false);
12414
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
12417
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
12425
while (bandIndex <
_selectedBandIndexes
.Count)
12427
if (
_selectedBandIndexes
[bandIndex] != hti._row)
12430
SetSelectedRowCore(
_selectedBandIndexes
[bandIndex], false);
12465
Debug.Assert(
_selectedBandIndexes
.Contains(hti._row) ==
12472
Debug.Assert(
_selectedBandIndexes
.Contains(hti._row));
12500
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
12501
if (
_selectedBandIndexes
.Count > 0)
12503
SetSelectedRowCore(
_selectedBandIndexes
.HeadInt, false);
12517
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
12525
while (
_selectedBandIndexes
.Count > 0)
12527
SetSelectedRowCore(
_selectedBandIndexes
.HeadInt, false);
12573
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
12574
if (
_selectedBandIndexes
.Count > 0)
12576
SetSelectedRowCore(
_selectedBandIndexes
.HeadInt, selected: false);
13228
_dataGridViewState2[State2_RaiseSelectionChanged] =
_selectedBandIndexes
.Count > 0
13230
_selectedBandIndexes
.Clear();
13773
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
13776
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
13784
while (bandIndex <
_selectedBandIndexes
.Count)
13786
if (
_selectedBandIndexes
[bandIndex] != hti._col)
13789
SetSelectedColumnCore(
_selectedBandIndexes
[bandIndex], false);
13831
else if (!
_selectedBandIndexes
.Contains(hti._col))
13880
Debug.Assert(
_selectedBandIndexes
.Contains(hti._col));
15483
int columnEntries =
_selectedBandIndexes
.Count;
15487
int columnIndex =
_selectedBandIndexes
[columnEntry];
15490
_selectedBandIndexes
[columnEntry] = columnIndex + 1;
15573
int rowEntries =
_selectedBandIndexes
.Count;
15577
int rowIndex =
_selectedBandIndexes
[rowEntry];
15580
_selectedBandIndexes
[rowEntry] = rowIndex + insertionCount;
15633
int rowEntries =
_selectedBandIndexes
.Count;
15637
int rowIndex =
_selectedBandIndexes
[rowEntry];
15640
_selectedBandIndexes
[rowEntry] = rowIndex + dataGridViewRows.Length;
17203
int columnEntries =
_selectedBandIndexes
.Count;
17207
int columnIndexSelected =
_selectedBandIndexes
[columnEntry];
17210
_selectedBandIndexes
.RemoveAt(columnEntry);
17218
_selectedBandIndexes
[columnEntry] = columnIndexSelected - 1;
17318
int rowEntries =
_selectedBandIndexes
.Count;
17322
int rowIndex =
_selectedBandIndexes
[rowEntry];
17326
_selectedBandIndexes
.RemoveAt(rowEntry);
17333
_selectedBandIndexes
[rowEntry] = rowIndex - 1;
18055
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
18058
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
18066
while (bandIndex <
_selectedBandIndexes
.Count)
18068
if (
_selectedBandIndexes
[bandIndex] != hti._row)
18071
SetSelectedRowCore(
_selectedBandIndexes
[bandIndex], false);
18115
Debug.Assert(
_selectedBandIndexes
.Contains(hti._row) ==
18159
Debug.Assert(
_selectedBandIndexes
.Contains(hti._row));
19941
_selectedBandSnapshotIndexes = new DataGridViewIntLinkedList(
_selectedBandIndexes
);
24260
if (
_selectedBandIndexes
.Count > BulkPaintThreshold)
24271
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
24273
while (bandIndex <
_selectedBandIndexes
.Count)
24275
if (
_selectedBandIndexes
[bandIndex] != _ptCurrentCell.X)
24278
SetSelectedColumnCore(
_selectedBandIndexes
[bandIndex], false);
24289
Debug.Assert(!
_selectedBandIndexes
.Contains(_ptCurrentCell.X));
24298
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
24300
while (bandIndex <
_selectedBandIndexes
.Count)
24302
if (
_selectedBandIndexes
[bandIndex] != _ptCurrentCell.Y)
24305
SetSelectedRowCore(
_selectedBandIndexes
[bandIndex], false);
24316
Debug.Assert(!
_selectedBandIndexes
.Contains(_ptCurrentCell.Y));
25562
if (column.Selected && (!
_selectedBandIndexes
.Contains(column.Index)))
25564
_selectedBandIndexes
.Add(column.Index);
26655
int selectedBand = 0, selectedBands =
_selectedBandIndexes
.Count;
26665
int columnIndex =
_selectedBandIndexes
[selectedBand];
26682
int selectedBand = 0, selectedBands =
_selectedBandIndexes
.Count;
26692
int rowIndex =
_selectedBandIndexes
[selectedBand];
27274
if (!
_selectedBandIndexes
.Contains(columnIndex))
27281
Debug.Assert(
_selectedBandIndexes
.Contains(columnIndex));
27301
if (!
_selectedBandIndexes
.Contains(columnIndexTo))
27308
Debug.Assert(
_selectedBandIndexes
.Contains(columnIndexTo));
27337
Debug.Assert(!
_selectedBandIndexes
.Contains(rowIndex));
27346
Debug.Assert(
_selectedBandIndexes
.Contains(rowIndex));
27403
if (MultiSelect && (_individualSelectedCells.Count +
_selectedBandIndexes
.Count) > 1)
27416
else if (
_selectedBandIndexes
.Count == 1)
27423
if (
_selectedBandIndexes
.HeadInt != columnIndex)
27434
if (
_selectedBandIndexes
.HeadInt != rowIndex)
27656
Debug.Assert(
_selectedBandIndexes
.Contains(columnIndex));
27657
_selectedBandIndexes
.Remove(columnIndex);
27692
Debug.Assert(
_selectedBandIndexes
.Contains(rowIndex));
27693
_selectedBandIndexes
.Remove(rowIndex);
27771
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27773
while (bandIndex <
_selectedBandIndexes
.Count)
27775
if (
_selectedBandIndexes
[bandIndex] != columnIndex)
27778
SetSelectedColumnCore(
_selectedBandIndexes
[bandIndex], false);
27787
if (!
_selectedBandIndexes
.Contains(columnIndex))
27794
if (
_selectedBandIndexes
.Contains(columnIndex))
27809
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27810
if (
_selectedBandIndexes
.Count > 0)
27812
SetSelectedColumnCore(
_selectedBandIndexes
.HeadInt, false);
27826
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27827
if (
_selectedBandIndexes
.Count > 0)
27829
SetSelectedColumnCore(
_selectedBandIndexes
.HeadInt, false);
27851
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27853
while (bandIndex <
_selectedBandIndexes
.Count)
27855
if (
_selectedBandIndexes
[bandIndex] != rowIndex)
27858
SetSelectedRowCore(
_selectedBandIndexes
[bandIndex], false);
27869
Debug.Assert(
_selectedBandIndexes
.Contains(rowIndex) ==
27878
Debug.Assert(
_selectedBandIndexes
.Contains(rowIndex) ==
27893
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27894
if (
_selectedBandIndexes
.Count > 0)
27896
SetSelectedRowCore(
_selectedBandIndexes
.HeadInt, false);
27910
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27911
if (
_selectedBandIndexes
.Count > 0)
27913
SetSelectedRowCore(
_selectedBandIndexes
.HeadInt, false);
27959
Debug.Assert(!
_selectedBandIndexes
.Contains(columnIndex));
27960
_selectedBandIndexes
.Add(columnIndex);
27965
Debug.Assert(
_selectedBandIndexes
.Contains(columnIndex));
27967
_selectedBandIndexes
.Remove(columnIndex);
27978
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
27990
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
27991
if (
_selectedBandIndexes
.Count > 0)
27993
int columnIndexSelected =
_selectedBandIndexes
.HeadInt;
28078
Debug.Assert(!
_selectedBandIndexes
.Contains(rowIndex));
28079
_selectedBandIndexes
.Add(rowIndex);
28085
Debug.Assert(
_selectedBandIndexes
.Contains(rowIndex));
28086
_selectedBandIndexes
.Remove(rowIndex);
28098
Debug.Assert(MultiSelect ||
_selectedBandIndexes
.Count <= 1);
28110
Debug.Assert(
_selectedBandIndexes
.Count <= 1);
28111
if (
_selectedBandIndexes
.Count > 0)
28113
int rowIndexSelected =
_selectedBandIndexes
.HeadInt;
28363
int row1Selected =
_selectedBandIndexes
.IndexOf(rowIndex1);
28364
int row2Selected =
_selectedBandIndexes
.IndexOf(rowIndex2);
28367
_selectedBandIndexes
[row1Selected] = rowIndex2;
28371
_selectedBandIndexes
[row2Selected] = rowIndex1;