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