2805 references to Columns
DemoConsole (1)
MainForm.cs (1)
311dataGridView.Columns.AddRange([comboBoxColumn]);
PresentationUI (8)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (8)
447Columns.Add( 449Columns.Add( 451Columns.Add( 453Columns.Add( 455Columns.Add( 457Columns.Add( 501(e.ColumnIndex > 0) && (e.ColumnIndex < Columns.Count)) 790for (int i = RightsTableColumnToIndex(_leftModifiablePermissionColumn); i < Columns.Count - 1; i++)
System.Windows.Forms (818)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (9)
64if (owner.Columns.Count == 0) 113if (!this.TryGetOwnerAs(out DataGridView? owner) || owner.Columns.Count == 0) 169int actualDisplayIndex = owner.Columns.ColumnIndexToActualDisplayIndex(hti.ColumnIndex, DataGridViewElementStates.Visible); 233int columnIndex = owner.Columns.ActualDisplayIndexToColumnIndex(i, DataGridViewElementStates.Visible); 234if (owner.IsSortable(owner.Columns[columnIndex])) 297int columnIndex = owner.Columns.ActualDisplayIndexToColumnIndex(i, DataGridViewElementStates.Visible); 298result[i] = owner.Columns[columnIndex].HeaderCell.AccessibilityObject; 322column = owner.Columns.ActualDisplayIndexToColumnIndex(column, DataGridViewElementStates.Visible); 341return this.TryGetOwnerAs(out DataGridView? owner) ? owner.Columns.GetColumnCount(DataGridViewElementStates.Visible) : base.ColumnCount;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (54)
897foreach (DataGridViewColumn dataGridViewColumn in Columns) 915DataGridViewAutoSizeColumnMode[] previousModes = new DataGridViewAutoSizeColumnMode[Columns.Count]; 916foreach (DataGridViewColumn dataGridViewColumn in Columns) 1385get => Columns.Count; 1395if (value != Columns.Count) 1400Columns.Clear(); 1402else if (value < Columns.Count) 1405while (value < Columns.Count) 1407int currentColumnCount = Columns.Count; 1408Columns.RemoveAt(currentColumnCount - 1); 1409if (Columns.Count >= currentColumnCount) 1419while (value > Columns.Count) 1421int currentColumnCount = Columns.Count; 1422Columns.Add(columnName: null, headerText: null); 1423if (Columns.Count <= currentColumnCount) 1653DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 1661dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 1713Debug.Assert(_ptCurrentCell.X < Columns.Count); 1744if (!Columns[value.ColumnIndex].Visible || (Rows.GetRowState(value.RowIndex) & DataGridViewElementStates.Visible) == 0) 1781Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 1802bool previousVisibleColumnExists = (Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 1820bool nextVisibleColumnExists = (Columns.GetNextColumn(Columns[_ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is not null); 2311&& firstDisplayedCell.ColumnIndex < Columns.Count); 2325if (!Columns[firstDisplayedCell.ColumnIndex].Frozen) 2378DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 2391DataGridViewColumn? dataGridViewColumnDbg1 = Columns.GetFirstColumn(DataGridViewElementStates.Displayed); 2395DataGridViewColumn? dataGridViewColumnDbg = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2452ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(value, Columns.Count); 2454if (!Columns[value].Visible) 2459if (Columns[value].Frozen) 2475int totalVisibleFrozenWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2512|| Columns.DisplayInOrder(DisplayedBandsInfo.FirstDisplayedScrollingCol, value)); 2514int maxHorizontalOffset = Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - displayWidth; 2682int widthNotVisible = Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - _layout.Data.Width; 2703int totalVisibleFrozenWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2744&& !Columns[_ptCurrentCell.X].Frozen 2757else if (Columns.DisplayInOrder(oldFirstVisibleScrollingCol, DisplayedBandsInfo.FirstDisplayedScrollingCol)) 2759scrollEventType = Columns.GetColumnCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingCol, DisplayedBandsInfo.FirstDisplayedScrollingCol) > 1 ? ScrollEventType.LargeIncrement : ScrollEventType.SmallIncrement; 2763Debug.Assert(Columns.DisplayInOrder(DisplayedBandsInfo.FirstDisplayedScrollingCol, oldFirstVisibleScrollingCol)); 2764scrollEventType = Columns.GetColumnCount(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingCol, oldFirstVisibleScrollingCol) > 1 ? ScrollEventType.LargeDecrement : ScrollEventType.SmallDecrement; 2804if (value > 0 && (Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - _layout.Data.Width) <= 0) 3096for (int columnIndex = 0; columnIndex < Columns.Count; columnIndex++) 3116for (int columnIndex = 0; columnIndex < Columns.Count; columnIndex++) 3118Debug.Assert(!Columns[columnIndex].ReadOnly); 3214if (Columns.Count == 0) 3218Columns.Add(dataGridViewTextBoxColumn); 3595DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 3702strc.Add(Columns[columnIndex]); 3755foreach (DataGridViewColumn dataGridViewColumn in Columns) 4153Columns.GetFirstColumn(DataGridViewElementStates.Visible) is not null 4948foreach (DataGridViewColumn dataGridViewColumn in Columns) 4961foreach (DataGridViewColumn dataGridViewColumn in Columns)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (14)
221for (int i = 0; i < _owner.Columns.Count; i++) 223if (_owner.Columns[i].IsDataBound) 225_owner.Columns[i].HeaderCell.SortGlyphDirection = SortOrder.None; 237for (int i = 0; i < _owner.Columns.Count; i++) 239DataGridViewColumn column = _owner.Columns[i]; 341Debug.Assert(DataBoundRowsCount() == CurrencyManager!.List!.Count || (_owner.Columns.Count == 0 && dataGridViewRowsCount == 0), 433if (_owner.Columns.Count > 0) 630for (int columnIndex = 0; columnIndex < _owner.Columns.Count; columnIndex++) 632DataGridViewColumn dataGridViewColumn = _owner.Columns[columnIndex]; 679if (_owner.Columns.Count == 0) 1199if (_owner.Columns.Count == 0) 1221DataGridViewColumn dataGridViewColumn = _owner.Columns.GetFirstColumn(DataGridViewElementStates.None)!; 1268|| (columnIndex < _owner.Columns.Count 1470Type columnType = _owner.Columns[columnIndex].ValueType!;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (654)
22if (cellAddress.X < 0 || cellAddress.X >= Columns.Count) 33int visibleColumnIndex = Columns.ColumnIndexToActualDisplayIndex(cellAddress.X, DataGridViewElementStates.Visible); 346DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 358dataGridViewColumn = Columns.GetNextColumn( 369Debug.Assert(columnIndex >= -1 && columnIndex < Columns.Count); 383width = Columns[columnIndex].Thickness; 461width = Columns[columnIndex].Thickness; 540if (Columns.GetColumnsWidth(DataGridViewElementStates.Visible) > _layout.Data.Width) 552|| dataGridViewColumn == Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen) 553|| dataGridViewColumn == Columns.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen)) 563foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 604foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 633foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 655foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 675foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 686foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 708foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 717if (Columns.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index)) 759foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 764&& Columns.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index)) 773foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 797foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 803|| Columns.DisplayInOrder(dataGridViewColumnTmp.Index, dataGridViewColumn.Index)) 823foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 825if (Columns.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index) 842foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 853foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 901foreach (DataGridViewColumn dataGridViewColumn in Columns) 911autoFillColumns ??= new(Columns.Count); 1251foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 1263foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 1380if (Columns.Count == 0 && Rows.Count == 0) 1387|| Columns.GetFirstColumn(DataGridViewElementStates.Visible) is null)) 1398allCellsSelected = _individualSelectedCells.Count == Columns.Count * Rows.Count; 1411DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 1419dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 1432allCellsSelected = _selectedBandIndexes.Count * Rows.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count; 1439DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 1456dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 1468allCellsSelected = _selectedBandIndexes.Count * Columns.Count + _individualSelectedCells.Count == Columns.Count * Rows.Count; 1484DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 1492dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 1523DataGridViewColumnCollection dataGridViewCols = Columns; 1660DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 1670dataGridViewColumn = Columns.GetNextColumn( 1714ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 1764int columnsCount = Columns.Count; 1767if (Columns[columnIndex].Visible) 1770? Math.Max(preferredHeight, Columns[columnIndex].HeaderCell.GetPreferredHeight(-1, Columns[columnIndex].Thickness)) 1771: Math.Max(preferredHeight, Columns[columnIndex].HeaderCell.GetPreferredSize(-1).Height); 1800ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 1829int columnsCount = Columns.Count; 1832if (Columns[columnIndexTmp].Visible) 1835? Math.Max(preferredHeight, Columns[columnIndexTmp].HeaderCell.GetPreferredHeight(-1, Columns[columnIndexTmp].Thickness)) 1836: Math.Max(preferredHeight, Columns[columnIndexTmp].HeaderCell.GetPreferredSize(-1).Height); 1869Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 1887DataGridViewColumn dataGridViewColumn = Columns[columnIndex]; 1907Columns[columnIndex].ThicknessInternal = preferredColumnWidth; 1934for (int columnIndex = 0; columnIndex < Columns.Count; columnIndex++) 2456int frozenWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 2457int scrollingWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - frozenWidth; 2458if (Columns[index].Frozen) 2530x += RightToLeftInternal ? -Columns[columnIndex].Width : Columns[columnIndex].Width; 2542clip.Width = leftEdge - Columns[columnIndex].MinimumThickness - _layout.Data.X + 3; 2552clip.X = leftEdge + Columns[columnIndex].MinimumThickness - _mouseBarOffset - 1; 2578Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.X < Columns.Count); 2976mouseX + _mouseBarOffset - Columns[_trackColumn].Thickness + 1, 2978Columns[_trackColumn].Thickness, 2988Columns[_trackColumn].Thickness, 3136if (Columns.Count > oldCurrentCellX && Columns[oldCurrentCellX].Visible) 3207if (!IsColumnOutOfBounds(oldCurrentCellX) && Columns[oldCurrentCellX].Visible) 3460ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndexException, Columns.Count); 3469ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndexException, Columns.Count); 3591Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count, $"Invalid columnIndex: {columnIndex}"); 3592return !Columns[columnIndex].IsDataBound || DataConnection is null || DataConnection.AllowEdit; 3606DataGridViewColumn? firstVisibleFrozenColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 3613Debug.Assert(Columns.DisplayInOrder(firstVisibleFrozenColumn.Index, dataGridViewColumn.Index)); 3614return Columns.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, firstVisibleFrozenColumn.Index, dataGridViewColumn.Index) < DisplayedBandsInfo.NumDisplayedFrozenCols; 3626if (Columns.DisplayInOrder(firstDisplayedScrollingColumnIndex, dataGridViewColumn.Index)) 3628return Columns.GetColumnCount(DataGridViewElementStates.Visible, firstDisplayedScrollingColumnIndex, dataGridViewColumn.Index) < DisplayedBandsInfo.NumDisplayedScrollingCols; 3651int wColumn = Columns[hti._col].Width; 3661DataGridViewColumn? dataGridViewColumnPrev = Columns.GetPreviousColumn( 3662Columns[hti._col], 3681dataGridViewColumnNext = Columns.GetNextColumn( 3682Columns[previousColumnIndex], 4142Debug.Assert(columnIndex < Columns.Count); 4185if (Columns.Count > cellsInCollection) 4188DataGridViewCell[] cells = new DataGridViewCell[Columns.Count - cellsInCollection]; 4189for (int columnIndex = cellsInCollection; columnIndex < Columns.Count; columnIndex++) 4191if (Columns[columnIndex].CellTemplate is null) 4196DataGridViewCell dgvcNew = (DataGridViewCell)Columns[columnIndex].CellTemplate!.Clone(); 4211if (Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) >= _layout.Data.Width) 4218DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 4235dataGridViewColumn = Columns.GetNextColumn( 4244dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 4571if (displayWidth <= 0 || Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0) 4582dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.None); 4606dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.None, DataGridViewElementStates.None); 4609Debug.Assert(cx <= Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen)); 4613dataGridViewColumn = Columns[firstDisplayedScrollingCol]; 4616dataGridViewColumn = Columns.GetFirstColumn( 4640dataGridViewColumn = Columns.GetNextColumn( 4675dataGridViewColumn = Columns.GetPreviousColumn((Columns[firstDisplayedScrollingCol]), 4685dataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, 4695dataGridViewColumn = Columns.GetPreviousColumn( 4696(Columns[firstDisplayedScrollingCol]), 4736dataGridViewColumn = Columns[firstDisplayedScrollingCol]; 4739dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 4915columnX -= Columns[columnIndex].Width; 4943foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 4953Debug.Assert(Columns.VerifyColumnDisplayIndexes()); 4977foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 4987Debug.Assert(Columns.VerifyColumnDisplayIndexes()); 5002Debug.Assert(anticipatedColumnIndex >= 0 && anticipatedColumnIndex <= Columns.Count); 5005if (dataGridViewColumn.DisplayIndex == -1 || dataGridViewColumn.DisplayIndex > Columns.Count) 5011Debug.Assert(dataGridViewColumn.DisplayIndex >= 0 && dataGridViewColumn.DisplayIndex <= Columns.Count); 5019dataGridViewColumnPrev = Columns.GetColumnAtDisplayIndex(displayIndex); 5033dataGridViewColumnNext = Columns.GetColumnAtDisplayIndex(displayIndex); 5036while (displayIndex < Columns.Count && (dataGridViewColumnNext is null || !dataGridViewColumnNext.Visible)); 5048foreach (DataGridViewColumn dataGridViewColumn in Columns) 5053dataGridViewTmp.Columns.Add(dataGridViewColumnClone); 5060dataGridViewTmp.Columns.Add(dataGridViewColumnClone); 5071dataGridViewColumnTmp = Columns.GetPreviousColumn( 5077DataGridViewColumn? dataGridViewColumnFirst = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 5084while (dataGridViewColumnTmp is not null && Columns.DisplayInOrder(dataGridViewColumnTmp.Index, dataGridViewColumn.Index)) 5087dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, 5095dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumn, 5103dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnLast, 5118while (dataGridViewColumnTmp is not null && Columns.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index)) 5121dataGridViewColumnTmp = Columns.GetPreviousColumn(dataGridViewColumnTmp, 5146int colCount = Columns.Count, displayIndex; 5157dataGridViewColumnNext = Columns.GetColumnAtDisplayIndex(displayIndex); 5176dataGridViewColumnPrev = Columns.GetColumnAtDisplayIndex(displayIndex); 5191for (int columnIndex = dataGridViewColumn.Index; columnIndex < Columns.Count; columnIndex++) 5193Columns[columnIndex].Index = Columns[columnIndex].Index - 1; 5194Debug.Assert(Columns[columnIndex].Index == columnIndex); 5202for (int columnIndex = dataGridViewColumn.Index + insertionCount; columnIndex < Columns.Count; columnIndex++) 5204Columns[columnIndex].Index = columnIndex; 5500int frozenVisibleColumnsWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 5521DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 5529dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 5543dataGridViewColumn = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 5553dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 5583for (int i = 0; i < Columns.Count; i++) 5585Columns[i].Dispose(); 5588Columns.Clear(); 5637rectInsertionBar.X = GetColumnXFromIndex(Columns.GetFirstColumn(DataGridViewElementStates.Visible)!.Index); 5646if (Columns.GetNextColumn(Columns[_trackColumnEdge], DataGridViewElementStates.Visible, DataGridViewElementStates.None) is null) 5661GetColumnXFromIndex(_trackColumnEdge) - Columns[_trackColumnEdge].Width - offsetFromCenter) 5663GetColumnXFromIndex(_trackColumnEdge) + Columns[_trackColumnEdge].Width - offsetFromCenter, 5760mouseX += ((hti._col == -1) ? RowHeadersWidth : Columns[hti._col].Thickness); 5803if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5814if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5828if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5875if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5883if (e.Button == MouseButtons.Left && dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5891if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5899if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 5907if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 6075Columns[_trackColumn].DisplayIndex = 0; 6077else if (Columns[_trackColumn].DisplayIndex > Columns[previousColumnIndex].DisplayIndex) 6079Columns[_trackColumn].DisplayIndex = Columns[previousColumnIndex].DisplayIndex + 1; 6083Columns[_trackColumn].DisplayIndex = Columns[previousColumnIndex].DisplayIndex; 6111delta = GetColumnXFromIndex(_trackColumn) - Columns[_trackColumn].Thickness - newX + 1; 6116delta = newX - (GetColumnXFromIndex(_trackColumn) + Columns[_trackColumn].Thickness) + 1; 6121int proposed = Columns[_trackColumn].Thickness + delta; 6122Debug.Assert(proposed >= Columns[_trackColumn].MinimumThickness); 6124Columns[_trackColumn].Thickness = proposed; 6414if (!RowHeadersVisible && Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0) 6634dataGridViewColumnTmp = Columns[columnIndexTmp]; 6643dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 6651dataGridViewColumnTmp = Columns.GetPreviousColumn(Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol], DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6655dataGridViewColumnTmp = Columns.GetPreviousColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6664dataGridViewColumnTmp = Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 6670dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 6675dataGridViewColumnTmp = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 6684dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DataGridViewElementStates.None); 6692dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DataGridViewElementStates.None); 6699&& columnIndexTmp < Columns.Count 6702&& Columns.DisplayInOrder(columnIndexTmp, DisplayedBandsInfo.FirstDisplayedScrollingCol) 6703&& !ColumnNeedsDisplayedState(Columns[columnIndexTmp])) 6705dataGridViewColumnTmp = Columns[columnIndexTmp]; 6713dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 6720&& columnIndexTmp < Columns.Count 6723&& Columns.DisplayInOrder(DisplayedBandsInfo.FirstDisplayedScrollingCol, columnIndexTmp))) 6724&& !ColumnNeedsDisplayedState(Columns[columnIndexTmp])) 6726dataGridViewColumnTmp = Columns[columnIndexTmp]; 6736dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 6743dataGridViewColumnTmp = Columns[Columns.Count - 1]; 6751dataGridViewColumnTmp = Columns.GetPreviousColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 6756for (columnIndexTmp = 0; columnIndexTmp < Columns.Count; columnIndexTmp++) 6758DataGridViewElementStates colStateDbg = Columns[columnIndexTmp].State; 6759bool columnNeedsDisplayedState = ColumnNeedsDisplayedState(Columns[columnIndexTmp]); 6774foreach (DataGridViewColumn dataGridViewColumn in Columns) 6873return cellCount + _selectedBandIndexes.Count * Columns.Count; 6942return Rows.Count * Columns.Count; 7047ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 7102Debug.Assert(columnIndex >= -1 && columnIndex < Columns.Count); 7112return columnIndex >= 0 ? Columns[columnIndex].HeaderCell : (DataGridViewCell)TopLeftHeaderCell; 7182dataGridViewColumn = Columns.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7185prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7201prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7220firstCell: Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0, 7238lastCell: Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0, 7249dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 7252nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7268nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7294dataGridViewColumn = Columns.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7299prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7317prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7339firstCell: Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0, 7352dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 7373nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7391nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7432if (Columns.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) == 0) 7440includeRowHeaders = (Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Selected) is null); 7468DataGridViewColumn? lastDataGridViewColumn = Columns.GetLastColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7473prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7489prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7521dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7542nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7558nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7588DataGridViewColumn? lastDataGridViewColumn = Columns.GetLastColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7594prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7612prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7649dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected); 7672nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7690nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None); 7739selectedVisibleCellExists = selectedVisibleRowExists && Columns.GetColumnCount(DataGridViewElementStates.Visible) != 0; 7743selectedVisibleColumnExists = Columns.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) != 0; 7812DataGridViewColumn? firstVisibleColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 7813DataGridViewColumn? lastVisibleColumn = Columns.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7844if (Columns[columnIndex].Visible) 7846if (lColumn is null || Columns.DisplayInOrder(columnIndex, lColumn.Index)) 7848lColumn = Columns[columnIndex]; 7851if (uColumn is null || Columns.DisplayInOrder(uColumn.Index, columnIndex)) 7853uColumn = Columns[columnIndex]; 7877if (lColumn is null || Columns.DisplayInOrder(dataGridViewCell.ColumnIndex, lColumn.Index)) 7882if (uColumn is null || Columns.DisplayInOrder(uColumn.Index, dataGridViewCell.ColumnIndex)) 7893Debug.Assert(lColumn.Index == uColumn.Index || Columns.DisplayInOrder(lColumn.Index, uColumn.Index)); 7918prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 7981nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 8033prevDataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 8103nextDataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 8193ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 8200Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 8202if (!Columns[columnIndex].Displayed) 8213for (dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 8236dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 8244for (dataGridViewColumn = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 8279dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 8337DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 8361dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 8378dataGridViewColumn = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 8403dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 8450Debug.Assert(index < Columns.Count); 8451Debug.Assert(Columns[index].Visible); 8455DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 8472dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 8489? Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol] 8490: Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 8510dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, 8517dataGridViewColumn = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 8518dataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, 8537dataGridViewColumn = Columns.GetPreviousColumn(dataGridViewColumn, 8548DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen); 8552dataGridViewColumn = Columns.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 8566int emptyBackgroundWidth = Math.Max(0, _layout.Data.Width - Columns.GetColumnsWidth(DataGridViewElementStates.Visible)); 8611DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 8687&& Columns[_ptAnchorCell.X].Frozen 8689&& Columns[_trackColumnEdge].Frozen 8691&& !Columns[hti._col].Frozen) 8695int firstUnfrozenColumnIndex = Columns.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen)!.Index; 8716&& (!Columns[_ptAnchorCell.X].Frozen || (_trackColumnEdge != -1 && !Columns[_trackColumnEdge].Frozen)) 8719|| Columns.GetPreviousColumn( 8720Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol], 8749&& Columns.GetNextColumn( 8750Columns[DisplayedBandsInfo.LastTotallyDisplayedScrollingCol], 8758DataGridViewColumn? newFirstVisibleScrollingCol = Columns.GetNextColumn( 8759Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol], 8764for (DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn( 8768dataGridViewColumn = Columns.GetNextColumn( 8867if (((_ptAnchorCell.X != -1 && !Columns[_ptAnchorCell.X].Frozen) || (_ptCurrentCell.X != -1 && !Columns[_ptCurrentCell.X].Frozen)) 8870|| Columns.GetPreviousColumn( 8871Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol], 8907|| Columns.GetNextColumn( 8908Columns[DisplayedBandsInfo.LastTotallyDisplayedScrollingCol], 8912DataGridViewColumn? newFirstVisibleScrollingCol = Columns.GetNextColumn( 8913Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol], 8917for (DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn( 8921dataGridViewColumn = Columns.GetNextColumn( 8993int preferredWidth = Math.Min(minimumWidth + Columns.GetColumnsWidth(DataGridViewElementStates.Visible), proposedConstraints.Width); 9349int columnWidth = Columns[hti._col].Thickness; 9358DataGridViewColumn dataGridViewColumn = Columns[hti._col]; 9369DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn( 9370Columns[hti._col], 9493int columnWidth = Columns[hti._col].Thickness; 9501DataGridViewColumn dataGridViewColumn = Columns[hti._col]; 9517dataGridViewColumn = Columns.GetPreviousColumn(Columns[hti._col], 9551DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 9779ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 9805ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 9812Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 10036return columnIndex >= Columns.Count || columnIndex == -1; 10041return columnIndex >= Columns.Count || rowIndex >= Rows.Count || columnIndex == -1 || rowIndex == -1; 10156int totalVisibleColCount = Columns.GetColumnCount(DataGridViewElementStates.Visible); 10158int totalVisibleWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible); 10159int totalVisibleFrozenWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 10533if (dataGridViewColumn.DisplayIndex == -1 || dataGridViewColumn.DisplayIndex >= Columns.Count) 10538Columns.InvalidateCachedColumnsOrder(); 10775float weightSum = Columns.GetColumnsFillWeight(DataGridViewElementStates.None) + dataGridViewColumn.FillWeight; 10782CorrectColumnFrozenState(dataGridViewColumn, Columns.Count); 10800int newColumnCount = Columns.Count + 1; 10848float weightSum = Columns.GetColumnsFillWeight(DataGridViewElementStates.None); 10947int previousColumnCount = Columns.Count; 11014foreach (DataGridViewColumn dataGridViewColumn in Columns) 11051if (dataGridViewRow.Cells.Count > Columns.Count) 11235if (previousModes.Length != Columns.Count) 11240foreach (DataGridViewColumn dataGridViewColumn in Columns) 11298foreach (DataGridViewColumn dataGridViewColumn in Columns) 11508ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(e.ColumnIndex, Columns.Count, "e.ColumnIndex"); 11586DataGridViewAutoSizeColumnCriteriaInternal autoSizeColumnCriteriaInternal = (DataGridViewAutoSizeColumnCriteriaInternal)Columns[columnIndex].InheritedAutoSizeMode; 11732Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 11820Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 11955Debug.Assert(Columns[columnIndex].Resizable == DataGridViewTriState.True); 12085if (hti._col >= Columns.Count) 12087DataGridViewColumn? dataGridViewLastVisibleColumn = Columns.GetLastColumn( 12194if (isControlDown && Columns[hti._col].Selected) 12204if (MultiSelect && isShiftDown && _ptAnchorCell.X > -1 && Columns[_ptAnchorCell.X].Selected) 12251if (Columns.DisplayInOrder(_ptAnchorCell.X, hti._col)) 12284&& (Columns[hti._col].Selected || IsSharedCellSelected(Rows.SharedRow(hti._row).Cells[hti._col], hti._row)) 12678&& _ptMouseDownCell.X < Columns.Count) 13056Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 13102Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 13262for (int i = 0; i < Columns.Count; i++) 13264if (Columns[i].DataPropertyName.Length != 0) 13266MapDataGridViewColumnToDataBoundField(Columns[i]); 13277if (Columns.Count != 0 && Rows.Count == 0) 13383foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 13396foreach (DataGridViewColumn dataGridViewColumnTmp in Columns) 13423Debug.Assert(Columns.VerifyColumnDisplayIndexes()); 13434Columns.InvalidateCachedColumnsOrder(); 13460if (!e.Handled && e.Button == MouseButtons.Left && e.ColumnIndex < Columns.Count) 13471DataGridViewAutoSizeColumnMode inheritedAutoSizeMode = Columns[e.ColumnIndex].InheritedAutoSizeMode; 13525float weightSum = Columns.GetColumnsFillWeight(DataGridViewElementStates.None) - dataGridViewColumn.FillWeight + fillWeight; 13534Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 13536if (!Columns[columnIndex].Visible) 13550DataGridViewAutoSizeColumnCriteriaInternal autoSizeColumnCriteriaInternal = (DataGridViewAutoSizeColumnCriteriaInternal)Columns[columnIndex].InheritedAutoSizeMode; 13602DataGridViewAutoSizeColumnCriteriaInternal autoSizeColumnCriteriaInternal = (DataGridViewAutoSizeColumnCriteriaInternal)Columns[columnIndex].InheritedAutoSizeMode; 13639DataGridViewColumn dataGridViewColumn = Columns[e.ColumnIndex]; 13689if (isControlDown && Columns[hti._col].Selected) 13766if (MultiSelect && isShiftDown && _ptAnchorCell.X > -1 && Columns[_ptAnchorCell.X].Selected) 13822if (Columns.DisplayInOrder(_ptAnchorCell.X, hti._col)) 14140if (_trackColumnEdge >= 0 && (Columns.DisplayInOrder(_trackColumn, _trackColumnEdge) || _trackColumnEdge == _trackColumn) && Columns.DisplayInOrder(_trackColumnEdge, hti._col)) 14142DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[_trackColumnEdge], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14147else if (_trackColumnEdge >= 0 && Columns.DisplayInOrder(_trackColumn, _trackColumnEdge) && Columns.DisplayInOrder(hti._col, _trackColumnEdge) && (Columns.DisplayInOrder(_trackColumn, hti._col) || hti._col == _trackColumn)) 14149DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[hti._col], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14154else if (_trackColumnEdge == -1 && Columns.DisplayInOrder(_trackColumn, hti._col)) 14156DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[_trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14161else if (_trackColumnEdge >= 0 && (Columns.DisplayInOrder(_trackColumnEdge, _trackColumn) || _trackColumnEdge == _trackColumn) && Columns.DisplayInOrder(hti._col, _trackColumnEdge)) 14163DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[_trackColumnEdge], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14168else if (_trackColumnEdge >= 0 && Columns.DisplayInOrder(_trackColumnEdge, _trackColumn) && Columns.DisplayInOrder(_trackColumnEdge, hti._col) && (Columns.DisplayInOrder(hti._col, _trackColumn) || hti._col == _trackColumn)) 14170DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[hti._col], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14175else if (_trackColumnEdge == -1 && Columns.DisplayInOrder(hti._col, _trackColumn)) 14177DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[_trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14182else if (_trackColumnEdge >= 0 && Columns.DisplayInOrder(_trackColumn, _trackColumnEdge) && Columns.DisplayInOrder(hti._col, _trackColumn)) 14184DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[_trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14187dataGridViewColumn = Columns.GetPreviousColumn(Columns[_trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14192else if (_trackColumnEdge >= 0 && Columns.DisplayInOrder(_trackColumn, hti._col) && Columns.DisplayInOrder(_trackColumnEdge, _trackColumn)) 14194DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[_trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14197dataGridViewColumn = Columns.GetNextColumn(Columns[_trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 14334Debug.Assert(Columns.DisplayInOrder(dataGridViewColumn.Index, DisplayedBandsInfo.FirstDisplayedScrollingCol)); 14476Columns.InvalidateCachedColumnsWidths(); 14849Debug.Assert(!Columns[dataGridViewCell.ColumnIndex].ReadOnly); 15279forceCurrentCellSelection: Columns.GetColumnCount(DataGridViewElementStates.Visible) == 1); 15435int newColumnCount = Columns.Count + 1; 15885mouseX += ((hti._col == -1) ? RowHeadersWidth : Columns[hti._col].Thickness); 15897if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15918if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15929if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15969mouseX += ((hti._col == -1) ? RowHeadersWidth : Columns[hti._col].Thickness); 15986if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 15998if (columnIndex < Columns.Count) 16008Debug.Assert(Columns[columnIndex].Resizable == DataGridViewTriState.True); 16036if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16121mouseX += ((hti._col == -1) ? RowHeadersWidth : Columns[hti._col].Thickness); 16159if (_ptMouseEnteredCell.X >= -1 && _ptMouseEnteredCell.X < Columns.Count 16355mouseX += ((hti._col == -1) ? RowHeadersWidth : Columns[hti._col].Thickness); 16382if (dgvcme.ColumnIndex < Columns.Count && dgvcme.RowIndex < Rows.Count) 16433mouseX += ((hti._col == -1) ? RowHeadersWidth : Columns[hti._col].Thickness); 17023Debug.Assert(dataGridViewColumn.Index >= 0 && dataGridViewColumn.Index < Columns.Count); 17034DataGridViewColumn? dataGridViewColumnNext = Columns.GetNextColumn( 17035Columns[columnIndex], 17047DataGridViewColumn? dataGridViewColumnPrevious = Columns.GetPreviousColumn( 17048Columns[columnIndex], 17101if (Columns.Count == 1) 17108int newColumnCount = Columns.Count - 1; 17137for (int i = 0; i < Columns.Count; i++) 17139if (dataGridViewColumn != Columns[i] 17140&& Columns[i].SortMode != DataGridViewColumnSortMode.NotSortable 17142Columns[i].DataPropertyName, 17146Debug.Assert(Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time"); 17147Debug.Assert(Columns[i].HeaderCell.SortGlyphDirection == dataGridViewColumn.HeaderCell.SortGlyphDirection, "DataBound columns should have the same SortGlyphDirection as the one on the DataGridView"); 17148SortedColumn = Columns[i]; 17149SortOrder = Columns[i].HeaderCell.SortGlyphDirection; 17166else if (Columns.DisplayInOrder(DisplayedBandsInfo.FirstDisplayedScrollingCol, dataGridViewColumn.Index)) 17534&& Columns.Count != 0 17659if (rowIndex < Rows.Count && columnIndex < Columns.Count) 17725Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 17947DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 18320if (rowIndex < Rows.Count && columnIndex < Columns.Count) 18332Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 18684&& !Columns[_ptCurrentCell.X].ReadOnly 18732if (dataGridViewCell is not null && rowIndex < Rows.Count && columnIndex < Columns.Count) 18779Debug.Assert(rowIndex < Rows.Count && columnIndex < Columns.Count); 18950for (int i = 0; i < Columns.Count; i++) 18952if (dataGridViewColumn != Columns[i] 18953&& Columns[i].SortMode != DataGridViewColumnSortMode.NotSortable 18956Columns[i].DataPropertyName, 18960Debug.Assert(Columns[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time"); 18961SortedColumn = Columns[i]; 19229int visibleColumnsWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Displayed); 19231if (Columns.Count > 0) 19348DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 19365dataGridViewColumnNext = Columns.GetNextColumn( 19426dataGridViewColumn = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 19445dataGridViewColumnNext = Columns.GetNextColumn(dataGridViewColumn, 19496if (Columns.Count > 0 || Rows.Count > 0) 19817leftEdge -= Columns[_ptCurrentCell.X].Width - 1; 19821Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19824if (!Columns[_ptCurrentCell.X].Frozen) 19826int totalVisibleFrozenWidth = Columns.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 20147DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 21068DataGridViewColumn? dataGridViewColumn = Columns.GetLastColumn( 21269if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21324if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21529DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 21545DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 21748if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 21803if (_ptCurrentCell.X >= 0 && Columns[_ptCurrentCell.X].Selected) 22006DataGridViewColumn dataGridViewColumn = Columns[_ptCurrentCell.X]; 22071DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 22082dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 22256if (Columns.DisplayInOrder(_ptAnchorCell.X, previousVisibleColumnIndex)) 22357if (Columns[_ptCurrentCell.X].Selected) 22367if (Columns.DisplayInOrder(_ptAnchorCell.X, previousVisibleColumnIndex)) 22442if (Columns[_ptCurrentCell.X].Selected) 22777if (Columns[_ptCurrentCell.X].Selected) 22810if (Columns[_ptCurrentCell.X].Selected) 22854if (Columns[_ptCurrentCell.X].Selected) 22917DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 23179DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 23448DataGridViewColumn? dataGridViewColumn = Columns.GetLastColumn( 23461dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 23634if (Columns.DisplayInOrder(_ptAnchorCell.X, nextVisibleColumnIndex)) 23735if (Columns[_ptCurrentCell.X].Selected) 23745if (Columns.DisplayInOrder(_ptAnchorCell.X, nextVisibleColumnIndex)) 23822if (Columns[_ptCurrentCell.X].Selected) 24127if (Columns[_ptCurrentCell.X].Selected) 24150if (Columns[_ptCurrentCell.X].Selected) 24194if (Columns[_ptCurrentCell.X].Selected) 24287if (!Columns[_ptCurrentCell.X].Selected) 24530DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 25325if (Columns.Count > 0 && NewRowIndex == -1) 25427DataGridViewColumnCollection dataGridViewCols = Columns; 25531if (DataConnection is not null && Columns.Count > 0) 25560foreach (DataGridViewColumn column in Columns) 25616foreach (DataGridViewColumn column in Columns) 26000Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 26003&& !Columns[columnIndex].Frozen 26007if (Columns.DisplayInOrder(columnIndex, DisplayedBandsInfo.FirstDisplayedScrollingCol)) 26017columnsToScroll = Columns.GetColumnCount(DataGridViewElementStates.Visible, columnIndex, DisplayedBandsInfo.FirstDisplayedScrollingCol); 26039&& Columns.DisplayInOrder(DisplayedBandsInfo.LastTotallyDisplayedScrollingCol, columnIndex))) 26055xColumnRightEdge = GetColumnXFromIndex(columnIndex) - Columns[columnIndex].Width; 26056while (xColumnRightEdge < _layout.Data.X && Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex)) 26058xColumnRightEdge += Columns[firstDisplayedScrollingColumn].Width; 26067firstDisplayedScrollingColumn = Columns.GetNextColumn( 26068Columns[firstDisplayedScrollingColumn], 26076xColumnRightEdge = GetColumnXFromIndex(columnIndex) + Columns[columnIndex].Width; 26077while (xColumnRightEdge > _layout.Data.Right && Columns.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex)) 26079xColumnRightEdge -= Columns[firstDisplayedScrollingColumn].Width; 26088firstDisplayedScrollingColumn = Columns.GetNextColumn( 26089Columns[firstDisplayedScrollingColumn], 26115dataGridViewColumnTmp = Columns[DisplayedBandsInfo.LastTotallyDisplayedScrollingCol]; 26118dataGridViewColumnTmp = Columns.GetNextColumn( 26133dataGridViewColumnTmp = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 26137dataGridViewColumnTmp = Columns.GetNextColumn( 26150dataGridViewColumnTmp = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 26158dataGridViewColumnTmp = Columns.GetPreviousColumn( 26176newFirstVisibleScrollingCol = Columns[DisplayedBandsInfo.FirstDisplayedScrollingCol]; 26182for (DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn( 26186dataGridViewColumn = Columns.GetNextColumn( 26199Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 26200Debug.Assert(DisplayedBandsInfo.FirstDisplayedScrollingCol >= -1 && DisplayedBandsInfo.FirstDisplayedScrollingCol < Columns.Count); 26201Debug.Assert(DisplayedBandsInfo.LastTotallyDisplayedScrollingCol >= -1 && DisplayedBandsInfo.LastTotallyDisplayedScrollingCol < Columns.Count); 26204Debug.Assert(Columns[columnIndex].Visible); 26552int maxColumnIndex = Columns.Count; 26592int columnIndex = 0, maxColumnIndex = Columns.Count; 26595if (!Columns[columnIndex].Selected) 26616DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 26685if (index >= Columns.Count) 26687index -= Columns.Count; 26744ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 26781Debug.Assert(rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count); 26948if (oldCurrentCellX < Columns.Count && oldCurrentCellY < Rows.Count) 27112if (oldCurrentCellX < Columns.Count && oldCurrentCellY < Rows.Count) 27144Debug.Assert((Columns[columnIndexFrom]).DisplayIndex <= (Columns[columnIndexTo]).DisplayIndex); 27172DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[columnIndex], 27201DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[columnIndex], 27233if (Columns.DisplayInOrder(columnIndexFrom, columnIndexTo)) 27266Debug.Assert((Columns[columnIndexFrom]).DisplayIndex <= (Columns[columnIndexTo]).DisplayIndex); 27287DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn( 27288Columns[columnIndex], 27468Debug.Assert(columnIndex >= 0 && rowIndex >= 0 && columnIndex < Columns.Count && rowIndex < Rows.Count); 27478if ((rowState & DataGridViewElementStates.ReadOnly) == 0 && !Columns[columnIndex].ReadOnly) 27493if (Columns[columnIndex].ReadOnly) 27495Columns[columnIndex].ReadOnlyInternal = false; 27522for (int column = columnIndex + 1; column < Columns.Count; column++) 27541Debug.Assert(columnIndex >= 0 && columnIndex < Columns.Count); 27543if (Columns[columnIndex].ReadOnly != readOnly) 27560Columns[columnIndex].ReadOnlyInternal = true; 27565Columns[columnIndex].ReadOnlyInternal = false; 27615ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 27628if ((rowState & DataGridViewElementStates.Selected) == 0 && !Columns[columnIndex].Selected) 27658Columns[columnIndex].SelectedInternal = false; 27684if (Columns.Count > BulkPaintThreshold) 27702for (int column = columnIndex + 1; column < Columns.Count; column++) 27732if (!Columns[columnIndex].Visible || (Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 27945ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 27950if (Columns[columnIndex].Selected != selected) 27958Columns[columnIndex].SelectedInternal = true; 27966Columns[columnIndex].SelectedInternal = false; 28487DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 28498dataGridViewColumn = Columns.GetNextColumn(Columns[_ptCurrentCell.X], 28648DataGridViewColumn? dataGridViewColumn = Columns.GetFirstColumn(DataGridViewElementStates.Visible); 28659dataGridViewColumn = Columns.GetPreviousColumn(Columns[_ptCurrentCell.X], 28674dataGridViewColumn = Columns.GetLastColumn( 28859ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 28871ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(columnIndex, Columns.Count); 28889dataGridViewColumnTmp = Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 28899dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DataGridViewElementStates.None); 28910dataGridViewColumnTmp = Columns[columnIndexTmp]; 28920dataGridViewColumnTmp = Columns.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29165&& _ptMouseEnteredCell.X < Columns.Count 29182mouseX += ((htiToUse._col == -1) ? RowHeadersWidth : Columns[htiToUse._col].Thickness); 29192&& _ptMouseEnteredCell.X < Columns.Count 29220if ((Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex) && Columns.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex)) 29221|| (Columns.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex) && Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex)) 29234if (Columns.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex) 29235&& (Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex) || anchorColumnIndex == oldEdgeColumnIndex) 29239DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29261else if (Columns.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex) 29262&& (Columns.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex) || oldEdgeColumnIndex == anchorColumnIndex) 29266DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29291if (Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || anchorColumnIndex == newEdgeColumnIndex) 29314if (Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || anchorColumnIndex == newEdgeColumnIndex) 29334else if (Columns.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex) 29335&& !Columns.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex) 29339DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29354else if (Columns.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex) 29357if (!Columns.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex)) 29360DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29377if (!Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex)) 29398DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29417else if (Columns.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex) 29420if (!Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex)) 29423DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29440if (Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex)) 29443DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29477else if (Columns.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex) 29478&& !Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex) 29482DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29497else if (Columns.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex)) 29499DataGridViewColumn? dataGridViewColumn = Columns.GetNextColumn(Columns[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29502if (Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) 29530if (Columns.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex)) 29534if (Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex)) 29536if (!Columns.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex)) 29557dataGridViewColumn = Columns.GetPreviousColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29580if ((Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) 29600if (!Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex)) 29605dataGridViewColumn = Columns.GetPreviousColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29625if (Columns.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) 29646else if (Columns.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex)) 29648DataGridViewColumn? dataGridViewColumn = Columns.GetPreviousColumn(Columns[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29651if (Columns.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (newEdgeColumnIndex == anchorColumnIndex)) 29679if ((Columns.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (newEdgeColumnIndex == anchorColumnIndex)) 29699if (!Columns.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex)) 29704dataGridViewColumn = Columns.GetNextColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29727if ((Columns.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) 29747if (!Columns.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex)) 29752dataGridViewColumn = Columns.GetNextColumn(Columns[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None); 29772if ((Columns.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) 29800if (Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex)) 29828if (Columns.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex)) 29981dataGridViewCell = Columns[hti._col].HeaderCell;
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (4)
125if (index < _ownerDataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible)) 127int actualColumnIndex = _ownerDataGridView.Columns.ActualDisplayIndexToColumnIndex(index, DataGridViewElementStates.Visible); 128return _ownerDataGridView.Columns[actualColumnIndex].HeaderCell.AccessibilityObject; 143int result = _ownerDataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (2)
813DataGridView.Columns.InvalidateCachedColumnCount(elementState); 814DataGridView.Columns.InvalidateCachedColumnsWidth(elementState);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
482ColumnIndex < DataGridView.Columns.Count &&
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (6)
320if (j < 0 || j > DataGridView.Columns.Count - 1 981DataGridViewColumn? dataGridViewColumn = DataGridView.Columns.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None); 1735Debug.Assert(ColumnIndex < DataGridView.Columns.Count); 1885Debug.Assert(ColumnIndex < DataGridView.Columns.Count); 2423Debug.Assert(ColumnIndex < dataGridView.Columns.Count); 3045if (DataGridView is not null && e.ColumnIndex < DataGridView.Columns.Count && e.RowIndex < DataGridView.Rows.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (5)
501if (_owner.OwningColumn == _owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible)) 523int previousVisibleColumnIndex = _owner.DataGridView.Columns.GetPreviousColumn( 538if (_owner.OwningColumn == _owner.DataGridView.Columns.GetLastColumn( 556int nextVisibleColumnIndex = _owner.DataGridView.Columns.GetNextColumn( 743? _owner.DataGridView.Columns.GetVisibleIndex(_owner.OwningColumn)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (7)
91dataGridViewCell.OwningColumn = _owner.DataGridView.Columns[index]; 120dataGridViewColumn = _owner.DataGridView.Columns[columnName]; 135dataGridViewColumn = _owner.DataGridView.Columns[columnName]; 178if (dataGridView is not null && dataGridView.Columns.Count > index) 180dataGridViewCell.OwningColumn = dataGridView.Columns[index]; 290if (dataGridView is not null && dataGridView.Columns.Count > index) 292dataGridViewCell.OwningColumn = dataGridView.Columns[index];
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (3)
85if (ColumnIndex < -1 || ColumnIndex >= _dataGridView.Columns.Count) 114if (ColumnIndex < -1 || ColumnIndex >= _dataGridView.Columns.Count) 149if (ColumnIndex < -1 || ColumnIndex >= _dataGridView.Columns.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
833ColumnIndex < DataGridView.Columns.Count && 971columnIndex < 0 || columnIndex >= DataGridView.Columns.Count || 978int visibleColumnIndex = DataGridView.Columns.ColumnIndexToActualDisplayIndex(columnIndex, DataGridViewElementStates.Visible);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
255if (value >= DataGridView.Columns.Count)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.cs (4)
26? Owner.DataGridView.Columns.GetVisibleIndex(Owner.OwningColumn) + 1 27: Owner.DataGridView.Columns.GetVisibleIndex(Owner.OwningColumn) 170if (Owner.OwningColumn == Owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible)) 189Owner.OwningColumn == Owner.DataGridView.Columns.GetLastColumn(DataGridViewElementStates.Visible,
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
732ColumnIndex < DataGridView.Columns.Count &&
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (7)
1109DataGridViewColumnCollection dataGridViewColumns = dataGridView.Columns; 1129Debug.Assert(Cells.Count == dataGridView.Columns.Count); 1314DataGridViewColumn dataGridViewColumn = DataGridView.Columns[dataGridViewCell.ColumnIndex]; 1515DataGridViewColumn? dataGridViewColumn = dataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen); 1537dataGridViewColumnNext = dataGridView.Columns.GetNextColumn(dataGridViewColumn, 1605dataGridViewColumn = dataGridView.Columns[dataGridView.FirstDisplayedScrollingColumnIndex]; 1627dataGridViewColumnNext = dataGridView.Columns.GetNextColumn(dataGridViewColumn,
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (3)
276int columnIndex = _owningDataGridViewRow.DataGridView.Columns.ActualDisplayIndexToColumnIndex(index, DataGridViewElementStates.Visible); 293int result = _owningDataGridViewRow.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible); 425int firstVisibleCell = dataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible)!.Index;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (34)
147dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 194if (DataGridView.Columns.Count == 0) 199if (DataGridView.RowTemplate.Cells.Count > DataGridView.Columns.Count) 205Debug.Assert(dataGridViewRow.Cells.Count == DataGridView.Columns.Count); 242dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 300if (DataGridView.Columns.Count == 0) 328if (DataGridView.Columns.Count == 0) 343if (DataGridView.RowTemplate.Cells.Count > DataGridView.Columns.Count) 349Debug.Assert(rowTemplate.Cells.Count == DataGridView.Columns.Count); 358dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 391if (DataGridView.Columns.Count == 0) 396if (dataGridViewRow.Cells.Count > DataGridView.Columns.Count) 416Debug.Assert(dataGridViewRow.Cells.Count == DataGridView.Columns.Count); 426dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 686dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 736if (DataGridView.Columns.Count == 0) 748Debug.Assert(dataGridViewRow.Cells.Count == DataGridView.Columns.Count); 754dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 831DataGridView.Columns.Count != 0 && 1412if (DataGridView.Columns.Count == 0) 1417if (DataGridView.RowTemplate.Cells.Count > DataGridView.Columns.Count) 1430Debug.Assert(rowTemplate.Cells.Count == DataGridView.Columns.Count); 1439dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 1474if (DataGridView.Columns.Count == 0) 1479if (dataGridViewRow.Cells.Count > DataGridView.Columns.Count) 1506if (DataGridView.Columns.Count == 0) 1511if (dataGridViewRow.Cells.Count > DataGridView.Columns.Count) 1518Debug.Assert(dataGridViewRow.Cells.Count == DataGridView.Columns.Count); 1528dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 1720dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 1781if (DataGridView.Columns.Count == 0) 1794Debug.Assert(dataGridViewRow.Cells.Count == DataGridView.Columns.Count); 1802dataGridViewCell.OwningColumn = DataGridView.Columns[columnIndex]; 2401int columnCount = DataGridView.Columns.Count;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (2)
149return (Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) > 0) 261(Owner.DataGridView is not null && Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) > 0)
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellAccessibleObject.cs (4)
208if (Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) > 0 && 214DataGridViewColumn col = Owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible)!; 252if (Owner.DataGridView is null || Owner.DataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0) 283if (dataGridView.Columns.GetColumnCount(DataGridViewElementStates.Visible) == 0)
System.Windows.Forms.Design (45)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (10)
166_liveDataGridView.Columns, 527DataGridViewColumn[] cols = new DataGridViewColumn[_liveDataGridView.Columns.Count - _initialDataGridViewColumnsCount]; 528for (int i = _initialDataGridViewColumnsCount; i < _liveDataGridView.Columns.Count; i++) 530cols[i - _initialDataGridViewColumnsCount] = _liveDataGridView.Columns[i]; 533for (int i = _initialDataGridViewColumnsCount; i < _liveDataGridView.Columns.Count;) 535_liveDataGridView.Columns.RemoveAt(_initialDataGridViewColumnsCount); 550_liveDataGridView.Columns.AddRange(cols); 646_liveDataGridView.Columns, 779_liveDataGridView.Columns, 806_initialDataGridViewColumnsCount = _liveDataGridView.Columns.Count;
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (5)
56_sampleDataGridViewSelected.Columns.Add(new DataGridViewTextBoxColumn()); 66_sampleDataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 307_sampleDataGridView.Columns[0].Width = _sampleDataGridView.Width; 310_sampleDataGridViewSelected.Columns[0].Width = _sampleDataGridViewSelected.Width; 333dataGridView.Columns[0].Width = dataGridView.Width;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (9)
68_columnsPrivateCopy = _dataGridViewPrivateCopy.Columns; 198DataGridViewColumn[] oldColumns = new DataGridViewColumn[_liveDataGridView.Columns.Count]; 199_liveDataGridView.Columns.CopyTo(oldColumns, 0); 205_liveDataGridView.Columns.Clear(); 267_liveDataGridView.Columns.Add(newColumns[i]); 1112_userAddedColumns.EnsureCapacity(_liveDataGridView.Columns.Count); 1121for (int i = 0; i < _liveDataGridView.Columns.Count; i++) 1123DataGridViewColumn liveCol = _liveDataGridView.Columns[i]; 1127col.ContextMenuStrip = _liveDataGridView.Columns[i].ContextMenuStrip;
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (2)
64dataGridView.Columns, 67_liveDataGridView?.Columns,
System\Windows\Forms\Design\DataGridViewDesigner.cs (19)
31public override ICollection AssociatedComponents => Control.Columns; 44for (int i = 0; i < dataGridView.Columns.Count; i++) 46componentChangeService?.OnComponentChanging(dataGridView.Columns[i], prop); 51for (int i = 0; i < dataGridView.Columns.Count; i++) 53componentChangeService?.OnComponentChanged(dataGridView.Columns[i], prop, null, null); 341for (int i = 0; i < dataGridView.Columns.Count; i++) 343DataGridViewColumn col = dataGridView.Columns[i]; 403for (int i = 0; i < dataGridView.Columns.Count; i++) 405DataGridViewColumn dataGridViewColumn = dataGridView.Columns[i]; 462for (int i = 0; i < dataGridView.Columns.Count;) 464DataGridViewColumn dataGridViewColumn = dataGridView.Columns[i]; 504dataGridView.Columns.Remove(dataGridViewColumn); 583DataGridViewColumn[] removeColumns = new DataGridViewColumn[dataGridView.Columns.Count]; 585for (int i = 0; i < dataGridView.Columns.Count; i++) 587DataGridViewColumn col = dataGridView.Columns[i]; 603dataGridView.Columns.Remove(removeColumns[i]); 689dataGridView.Columns.Add(columnsToBeAdded[i]); 775() => new DataGridViewAddColumnDialog(Control.Columns, Control)); 776dialog.Start(Control.Columns.Count, persistChangesToDesigner: true);
System.Windows.Forms.Design.Tests (5)
System\Windows\Forms\Design\DataGridViewAddColumnDialogTests.cs (2)
27DataGridViewColumnCollection columns = _dataGridView.Columns; 101DataGridViewColumnCollection columns = _dataGridView.Columns;
System\Windows\Forms\Design\DataGridViewDesignerTests.cs (3)
41_designer.AssociatedComponents.Should().BeSameAs(_dataGridView.Columns); 65Times.Exactly(_dataGridView.Columns.Count) 75Times.Exactly(_dataGridView.Columns.Count)
System.Windows.Forms.Tests (1923)
System\Windows\Forms\AccessibleObjects\DataGridView.DataGridViewEditingPanelAccessibleObjectTests.cs (2)
17dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 33dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (152)
38dataGridView.Columns.Add(column); 39dataGridView.Sort(dataGridView.Columns[0], ListSortDirection.Ascending); 64dataGridView.Columns.Add(column1); 65dataGridView.Columns.Add(column2); 90dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 102dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 124dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 137dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 205dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 206dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 226dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 227dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 277dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 296dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 327dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 348dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 369dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 370dataGridView.Columns[0].Visible = false; 383dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 408dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 433dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 534dataGridView.Columns.Add(new DataGridViewButtonColumn()); 552dataGridView.Columns.Add(new DataGridViewButtonColumn()); 581dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 634dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 653dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 672dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 691dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 709dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 727dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 747dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 768dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 789dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 810dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 833dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 856dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 880dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 900dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 920dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 940dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 960dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 980dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1002dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1022dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1042dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1062dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1082dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1102dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1119dataGridView.Columns.Add("Test 1", "Test 1"); 1120dataGridView.Columns.Add("Test 2", "Test 2"); 1121dataGridView.Columns.Add("Test 3", "Test 3"); 1127Assert.Equal(dataGridView.Columns[0].HeaderCell.AccessibilityObject, columnHeaders[0]); 1128Assert.Equal(dataGridView.Columns[1].HeaderCell.AccessibilityObject, columnHeaders[1]); 1129Assert.Equal(dataGridView.Columns[2].HeaderCell.AccessibilityObject, columnHeaders[2]); 1137dataGridView.Columns.Add("Test 1", "Test 1"); 1138dataGridView.Columns.Add("Test 2", "Test 2"); 1139dataGridView.Columns.Add("Test 3", "Test 3"); 1140dataGridView.Columns[0].Visible = false; 1146Assert.Equal(dataGridView.Columns[1].HeaderCell.AccessibilityObject, columnHeaders[0]); 1147Assert.Equal(dataGridView.Columns[2].HeaderCell.AccessibilityObject, columnHeaders[1]); 1155dataGridView.Columns.Add("Test 1", "Test 1"); 1156dataGridView.Columns.Add("Test 2", "Test 2"); 1157dataGridView.Columns.Add("Test 3", "Test 3"); 1158dataGridView.Columns[1].Visible = false; 1164Assert.Equal(dataGridView.Columns[0].HeaderCell.AccessibilityObject, columnHeaders[0]); 1165Assert.Equal(dataGridView.Columns[2].HeaderCell.AccessibilityObject, columnHeaders[1]); 1173dataGridView.Columns.Add("Test 1", "Test 1"); 1174dataGridView.Columns.Add("Test 2", "Test 2"); 1175dataGridView.Columns.Add("Test 3", "Test 3"); 1176dataGridView.Columns[2].Visible = false; 1182Assert.Equal(dataGridView.Columns[0].HeaderCell.AccessibilityObject, columnHeaders[0]); 1183Assert.Equal(dataGridView.Columns[1].HeaderCell.AccessibilityObject, columnHeaders[1]); 1191dataGridView.Columns.Add("Test 1", "Test 1"); 1192dataGridView.Columns.Add("Test 2", "Test 2"); 1193dataGridView.Columns.Add("Test 3", "Test 3"); 1194dataGridView.Columns[0].Visible = false; 1195dataGridView.Columns[1].Visible = false; 1196dataGridView.Columns[2].Visible = false; 1209dataGridView.Columns.Add("Test", "Test"); 1228dataGridView.Columns.Add("Test", "Test"); 1247dataGridView.Columns.Add("Test", "Test"); 1266dataGridView.Columns.Add("Test", "Test"); 1285dataGridView.Columns.Add("Test", "Test"); 1304dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1305dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1306dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1310dataGridView.Columns[0].Visible = false; 1314int columnCount = dataGridView.Columns.Count; 1335dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1336dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1337dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1341dataGridView.Columns[1].Visible = false; 1345int columnCount = dataGridView.Columns.Count; 1378dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1379dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1380dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1384dataGridView.Columns[2].Visible = false; 1388int columnCount = dataGridView.Columns.Count; 1409dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1410dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1411dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1412dataGridView.Columns[0].DisplayIndex = 2; 1413dataGridView.Columns[1].DisplayIndex = 1; 1414dataGridView.Columns[2].DisplayIndex = 0; 1431dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1432dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1433dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1434dataGridView.Columns[0].DisplayIndex = 2; 1435dataGridView.Columns[1].DisplayIndex = 1; 1436dataGridView.Columns[2].DisplayIndex = 0; 1437dataGridView.Columns[0].Visible = false; 1453dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1454dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1455dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1456dataGridView.Columns[0].DisplayIndex = 2; 1457dataGridView.Columns[1].DisplayIndex = 1; 1458dataGridView.Columns[2].DisplayIndex = 0; 1459dataGridView.Columns[1].Visible = false; 1475dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1476dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1477dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1478dataGridView.Columns[0].DisplayIndex = 2; 1479dataGridView.Columns[1].DisplayIndex = 1; 1480dataGridView.Columns[2].DisplayIndex = 0; 1481dataGridView.Columns[2].Visible = false; 1497dataGridView.Columns.Add("Test 1", "Test 1"); 1498dataGridView.Columns.Add("Test 2", "Test 2"); 1499dataGridView.Columns.Add("Test 3", "Test 3"); 1509dataGridView.Columns.Add("Test 1", "Test 1"); 1510dataGridView.Columns.Add("Test 2", "Test 2"); 1511dataGridView.Columns.Add("Test 3", "Test 3"); 1512dataGridView.Columns[0].Visible = false; 1522dataGridView.Columns.Add("Test 1", "Test 1"); 1523dataGridView.Columns.Add("Test 2", "Test 2"); 1524dataGridView.Columns.Add("Test 3", "Test 3"); 1525dataGridView.Columns[0].Visible = false; 1526dataGridView.Columns[1].Visible = false; 1536dataGridView.Columns.Add("Test 1", "Test 1"); 1537dataGridView.Columns.Add("Test 2", "Test 2"); 1538dataGridView.Columns.Add("Test 3", "Test 3"); 1539dataGridView.Columns[0].Visible = false; 1540dataGridView.Columns[1].Visible = false; 1541dataGridView.Columns[2].Visible = false; 1551dataGridView.Columns.Add("Test 1", "Test 1"); 1564dataGridView.Columns.Add("Test 1", "Test 1"); 1578dataGridView.Columns.Add("Test 1", "Test 1"); 1593dataGridView.Columns.Add("Test 1", "Test 1"); 1609dataGridView.Columns.Add("Test 1", "Test 1"); 1622dataGridView.Columns.Add("Test 1", "Test 1"); 1636dataGridView.Columns.Add("Test 1", "Test 1"); 1651dataGridView.Columns.Add("Test 1", "Test 1"); 1668dataGridView.Columns.Add(column);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (102)
45dataGridView.Columns[0].Width = 40; 46dataGridView.Columns[1].Width = 40; 47dataGridView.Columns[2].Width = 40; 48dataGridView.Columns[3].Width = 40; 76dataGridView.Columns[0].Width = 40; 77dataGridView.Columns[1].Width = 40; 78dataGridView.Columns[2].Width = 40; 79dataGridView.Columns[3].Width = 40; 232dataGridView.Columns.Add(column); 250dataGridView.Columns.Add(column); 269dataGridView.Columns.Add(column); 645dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 646dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 680dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 695dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 710dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 740dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 772dataGridView.Columns.Add("Column 1", "Column 1"); 791dataGridView.Columns.Add("Column 1", "Column 1"); 811dataGridView.Columns.Add("Column 1", "Column 1"); 831dataGridView.Columns.Add("Column 1", "Column 1"); 870dataGridView.Columns.Add("Column 1", "Column 1"); 871dataGridView.Columns.Add("Column 2", "Column 2"); 872dataGridView.Columns.Add("Column 3", "Column 3"); 889dataGridView.Columns.Add("Column 1", "Column 1"); 890dataGridView.Columns.Add("Column 2", "Column 2"); 891dataGridView.Columns.Add("Column 3", "Column 3"); 892dataGridView.Columns[0].Visible = false; 909dataGridView.Columns.Add("Column 1", "Column 1"); 910dataGridView.Columns.Add("Column 2", "Column 2"); 911dataGridView.Columns.Add("Column 3", "Column 3"); 912dataGridView.Columns[1].Visible = false; 929dataGridView.Columns.Add("Column 1", "Column 1"); 930dataGridView.Columns.Add("Column 2", "Column 2"); 931dataGridView.Columns.Add("Column 3", "Column 3"); 932dataGridView.Columns[2].Visible = false; 949dataGridView.Columns.Add("Column 1", "Column 1"); 950dataGridView.Columns.Add("Column 2", "Column 2"); 951dataGridView.Columns.Add("Column 3", "Column 3"); 952dataGridView.Columns[0].DisplayIndex = 2; 953dataGridView.Columns[1].DisplayIndex = 1; 954dataGridView.Columns[2].DisplayIndex = 0; 971dataGridView.Columns.Add("Column 1", "Column 1"); 972dataGridView.Columns.Add("Column 2", "Column 2"); 973dataGridView.Columns.Add("Column 3", "Column 3"); 974dataGridView.Columns[0].DisplayIndex = 2; 975dataGridView.Columns[1].DisplayIndex = 1; 976dataGridView.Columns[2].DisplayIndex = 0; 977dataGridView.Columns[0].Visible = false; 994dataGridView.Columns.Add("Column 1", "Column 1"); 995dataGridView.Columns.Add("Column 2", "Column 2"); 996dataGridView.Columns.Add("Column 3", "Column 3"); 997dataGridView.Columns[0].DisplayIndex = 2; 998dataGridView.Columns[1].DisplayIndex = 1; 999dataGridView.Columns[2].DisplayIndex = 0; 1000dataGridView.Columns[1].Visible = false; 1017dataGridView.Columns.Add("Column 1", "Column 1"); 1018dataGridView.Columns.Add("Column 2", "Column 2"); 1019dataGridView.Columns.Add("Column 3", "Column 3"); 1020dataGridView.Columns[0].DisplayIndex = 2; 1021dataGridView.Columns[1].DisplayIndex = 1; 1022dataGridView.Columns[2].DisplayIndex = 0; 1023dataGridView.Columns[2].Visible = false; 1040dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1142dataGridView.Columns[0].Visible = false; 1161dataGridView.Columns[1].Visible = false; 1180dataGridView.Columns[2].Visible = false; 1200dataGridView.Columns[0].Visible = false; 1220dataGridView.Columns[1].Visible = false; 1240dataGridView.Columns[3].Visible = false; 1259dataGridView.Columns[0].DisplayIndex = 2; 1260dataGridView.Columns[1].DisplayIndex = 1; 1261dataGridView.Columns[2].DisplayIndex = 0; 1283dataGridView.Columns[0].DisplayIndex = 2; 1284dataGridView.Columns[1].DisplayIndex = 1; 1285dataGridView.Columns[2].DisplayIndex = 0; 1286dataGridView.Columns[0].Visible = false; 1305dataGridView.Columns[0].DisplayIndex = 2; 1306dataGridView.Columns[1].DisplayIndex = 1; 1307dataGridView.Columns[2].DisplayIndex = 0; 1308dataGridView.Columns[1].Visible = false; 1327dataGridView.Columns[0].DisplayIndex = 2; 1328dataGridView.Columns[1].DisplayIndex = 1; 1329dataGridView.Columns[2].DisplayIndex = 0; 1330dataGridView.Columns[2].Visible = false; 1350dataGridView.Columns[0].DisplayIndex = 2; 1351dataGridView.Columns[1].DisplayIndex = 1; 1352dataGridView.Columns[2].DisplayIndex = 0; 1372dataGridView.Columns[0].DisplayIndex = 2; 1373dataGridView.Columns[1].DisplayIndex = 1; 1374dataGridView.Columns[2].DisplayIndex = 0; 1375dataGridView.Columns[0].Visible = false; 1392dataGridView.Columns[0].DisplayIndex = 2; 1393dataGridView.Columns[1].DisplayIndex = 1; 1394dataGridView.Columns[2].DisplayIndex = 0; 1395dataGridView.Columns[1].Visible = false; 1412dataGridView.Columns[0].DisplayIndex = 2; 1413dataGridView.Columns[1].DisplayIndex = 1; 1414dataGridView.Columns[2].DisplayIndex = 0; 1415dataGridView.Columns[2].Visible = false; 1464dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1483dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewCheckBoxCellAccessibleObjectTests.cs (6)
31control.Columns.Add(new DataGridViewCheckBoxColumn()); 76control.Columns.Add(new DataGridViewCheckBoxColumn()); 134control.Columns.Add(new DataGridViewCheckBoxColumn()); 158control.Columns.Add(new DataGridViewCheckBoxColumn()); 213control.Columns.Add(new DataGridViewCheckBoxColumn()); 254dataGridView.Columns.Add(checkBoxColumn);
System\Windows\Forms\AccessibleObjects\DataGridViewColumnHeaderCellAccessibleObjectTests.cs (266)
30control.Columns.Add("Column 1", "Header text 1"); 31DataGridViewColumnHeaderCell cell = control.Columns[0].HeaderCell; 51control.Columns.Add("Column 1", testHeaderName); 53var accessibleObject = (DataGridViewColumnHeaderCellAccessibleObject)control.Columns[0].HeaderCell.AccessibilityObject; 64control.Columns.Add("Column 1", testHeaderName); 66var accessibleObject = (DataGridViewColumnHeaderCellAccessibleObject)control.Columns[0].HeaderCell.AccessibilityObject; 76control.Columns.Add("Column 1", "Header text 1"); 79var accessibleObject = (DataGridViewColumnHeaderCellAccessibleObject)control.Columns[0].HeaderCell.AccessibilityObject; 89control.Columns.Add("Column 1", "Header text 1"); 91var accessibleObject = (DataGridViewColumnHeaderCellAccessibleObject)control.Columns[0].HeaderCell.AccessibilityObject; 101control.Columns.Add("Column 1", "Header text 1"); 102DataGridViewColumn column = control.Columns[0]; 115control.Columns.Add("Column 1", "Header text 1"); 116DataGridViewColumn column = control.Columns[0]; 146control.Columns.Add("Column 1", "Header text 1"); 147DataGridViewColumn column = control.Columns[0]; 158control.Columns.Add("Column 1", "Header text 1"); 159var accessibleObject = control.Columns[0].HeaderCell.AccessibilityObject; 170control.Columns.Add("Column 1", "Column 1"); 171control.Columns.Add("Column 2", "Column 2"); 172control.Columns.Add("Column 3", "Column 3"); 174AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 175AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 176AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 192control.Columns.Add("Column 1", "Column 1"); 193control.Columns.Add("Column 2", "Column 2"); 194control.Columns.Add("Column 3", "Column 3"); 195control.Columns[0].Visible = false; 197AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 198AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 212control.Columns.Add("Column 1", "Column 1"); 213control.Columns.Add("Column 2", "Column 2"); 214control.Columns.Add("Column 3", "Column 3"); 215control.Columns[1].Visible = false; 217AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 218AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 232control.Columns.Add("Column 1", "Column 1"); 233control.Columns.Add("Column 2", "Column 2"); 234control.Columns.Add("Column 3", "Column 3"); 235control.Columns[2].Visible = false; 237AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 238AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 252control.Columns.Add("Column 1", "Column 1"); 253control.Columns.Add("Column 2", "Column 2"); 254control.Columns.Add("Column 3", "Column 3"); 257AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 258AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 259AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 277control.Columns.Add("Column 1", "Column 1"); 278control.Columns.Add("Column 2", "Column 2"); 279control.Columns.Add("Column 3", "Column 3"); 280control.Columns[0].Visible = false; 283AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 284AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 300control.Columns.Add("Column 1", "Column 1"); 301control.Columns.Add("Column 2", "Column 2"); 302control.Columns.Add("Column 3", "Column 3"); 303control.Columns[1].Visible = false; 306AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 307AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 323control.Columns.Add("Column 1", "Column 1"); 324control.Columns.Add("Column 2", "Column 2"); 325control.Columns.Add("Column 3", "Column 3"); 326control.Columns[2].Visible = false; 329AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 330AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 346control.Columns.Add("Column 1", "Column 1"); 347control.Columns.Add("Column 2", "Column 2"); 348control.Columns.Add("Column 3", "Column 3"); 350AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 351AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 352AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 368control.Columns.Add("Column 1", "Column 1"); 369control.Columns.Add("Column 2", "Column 2"); 370control.Columns.Add("Column 3", "Column 3"); 371control.Columns[0].Visible = false; 373AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 374AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 388control.Columns.Add("Column 1", "Column 1"); 389control.Columns.Add("Column 2", "Column 2"); 390control.Columns.Add("Column 3", "Column 3"); 391control.Columns[1].Visible = false; 393AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 394AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 408control.Columns.Add("Column 1", "Column 1"); 409control.Columns.Add("Column 2", "Column 2"); 410control.Columns.Add("Column 3", "Column 3"); 411control.Columns[2].Visible = false; 413AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 414AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 428control.Columns.Add("Column 1", "Column 1"); 429control.Columns.Add("Column 2", "Column 2"); 430control.Columns.Add("Column 3", "Column 3"); 433AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 434AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 435AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 453control.Columns.Add("Column 1", "Column 1"); 454control.Columns.Add("Column 2", "Column 2"); 455control.Columns.Add("Column 3", "Column 3"); 456control.Columns[0].Visible = false; 459AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 460AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 476control.Columns.Add("Column 1", "Column 1"); 477control.Columns.Add("Column 2", "Column 2"); 478control.Columns.Add("Column 3", "Column 3"); 479control.Columns[1].Visible = false; 482AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 483AccessibleObject accessibleObject3 = control.Columns[2].HeaderCell.AccessibilityObject; 499control.Columns.Add("Column 1", "Column 1"); 500control.Columns.Add("Column 2", "Column 2"); 501control.Columns.Add("Column 3", "Column 3"); 502control.Columns[2].Visible = false; 505AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 506AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 522control.Columns.Add("Column 1", "Column 1"); 523AccessibleObject accessibleObject = control.Columns[0].HeaderCell.AccessibilityObject; 534control.Columns.Add("Column 1", "Column 1"); 536AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 549control.Columns.Add("Column 1", "Column 1"); 550AccessibleObject accessibleObject = control.Columns[0].HeaderCell.AccessibilityObject; 561control.Columns.Add("Column 1", "Column 1"); 563AccessibleObject accessibleObject1 = control.Columns[0].HeaderCell.AccessibilityObject; 576control.Columns.Add("Column 1", "Column 1"); 577control.Columns.Add("Column 2", "Column 2"); 578control.Columns.Add("Column 3", "Column 3"); 579control.Columns[0].DisplayIndex = 2; 580control.Columns[1].DisplayIndex = 1; 581control.Columns[2].DisplayIndex = 0; 584AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 585AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 586AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 604control.Columns.Add("Column 1", "Column 1"); 605control.Columns.Add("Column 2", "Column 2"); 606control.Columns.Add("Column 3", "Column 3"); 607control.Columns[0].DisplayIndex = 2; 608control.Columns[0].Visible = false; 609control.Columns[1].DisplayIndex = 1; 610control.Columns[2].DisplayIndex = 0; 613AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 614AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 630control.Columns.Add("Column 1", "Column 1"); 631control.Columns.Add("Column 2", "Column 2"); 632control.Columns.Add("Column 3", "Column 3"); 633control.Columns[0].DisplayIndex = 2; 634control.Columns[1].DisplayIndex = 1; 635control.Columns[1].Visible = false; 636control.Columns[2].DisplayIndex = 0; 639AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 640AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 656control.Columns.Add("Column 1", "Column 1"); 657control.Columns.Add("Column 2", "Column 2"); 658control.Columns.Add("Column 3", "Column 3"); 659control.Columns[0].DisplayIndex = 2; 660control.Columns[1].DisplayIndex = 1; 661control.Columns[2].DisplayIndex = 0; 662control.Columns[2].Visible = false; 665AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 666AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 682control.Columns.Add("Column 1", "Column 1"); 683control.Columns.Add("Column 2", "Column 2"); 684control.Columns.Add("Column 3", "Column 3"); 685control.Columns[0].DisplayIndex = 2; 686control.Columns[1].DisplayIndex = 1; 687control.Columns[2].DisplayIndex = 0; 689AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 690AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 691AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 707control.Columns.Add("Column 1", "Column 1"); 708control.Columns.Add("Column 2", "Column 2"); 709control.Columns.Add("Column 3", "Column 3"); 710control.Columns[0].DisplayIndex = 2; 711control.Columns[0].Visible = false; 712control.Columns[1].DisplayIndex = 1; 713control.Columns[2].DisplayIndex = 0; 715AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 716AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 730control.Columns.Add("Column 1", "Column 1"); 731control.Columns.Add("Column 2", "Column 2"); 732control.Columns.Add("Column 3", "Column 3"); 733control.Columns[0].DisplayIndex = 2; 734control.Columns[1].DisplayIndex = 1; 735control.Columns[1].Visible = false; 736control.Columns[2].DisplayIndex = 0; 738AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 739AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 753control.Columns.Add("Column 1", "Column 1"); 754control.Columns.Add("Column 2", "Column 2"); 755control.Columns.Add("Column 3", "Column 3"); 756control.Columns[0].DisplayIndex = 2; 757control.Columns[1].DisplayIndex = 1; 758control.Columns[2].DisplayIndex = 0; 759control.Columns[2].Visible = false; 761AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 762AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 776control.Columns.Add("Column 1", "Column 1"); 777control.Columns.Add("Column 2", "Column 2"); 778control.Columns.Add("Column 3", "Column 3"); 779control.Columns[0].DisplayIndex = 2; 780control.Columns[1].DisplayIndex = 1; 781control.Columns[2].DisplayIndex = 0; 784AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 785AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 786AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 804control.Columns.Add("Column 1", "Column 1"); 805control.Columns.Add("Column 2", "Column 2"); 806control.Columns.Add("Column 3", "Column 3"); 807control.Columns[0].DisplayIndex = 2; 808control.Columns[0].Visible = false; 809control.Columns[1].DisplayIndex = 1; 810control.Columns[2].DisplayIndex = 0; 813AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 814AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 830control.Columns.Add("Column 1", "Column 1"); 831control.Columns.Add("Column 2", "Column 2"); 832control.Columns.Add("Column 3", "Column 3"); 833control.Columns[0].DisplayIndex = 2; 834control.Columns[1].DisplayIndex = 1; 835control.Columns[1].Visible = false; 836control.Columns[2].DisplayIndex = 0; 839AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 840AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 856control.Columns.Add("Column 1", "Column 1"); 857control.Columns.Add("Column 2", "Column 2"); 858control.Columns.Add("Column 3", "Column 3"); 859control.Columns[0].DisplayIndex = 2; 860control.Columns[1].DisplayIndex = 1; 861control.Columns[2].DisplayIndex = 0; 862control.Columns[2].Visible = false; 865AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 866AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 882control.Columns.Add("Column 1", "Column 1"); 883control.Columns.Add("Column 2", "Column 2"); 884control.Columns.Add("Column 3", "Column 3"); 885control.Columns[0].DisplayIndex = 2; 886control.Columns[1].DisplayIndex = 1; 887control.Columns[2].DisplayIndex = 0; 889AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 890AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 891AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 907control.Columns.Add("Column 1", "Column 1"); 908control.Columns.Add("Column 2", "Column 2"); 909control.Columns.Add("Column 3", "Column 3"); 910control.Columns[0].DisplayIndex = 2; 911control.Columns[0].Visible = false; 912control.Columns[1].DisplayIndex = 1; 913control.Columns[2].DisplayIndex = 0; 915AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 916AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 930control.Columns.Add("Column 1", "Column 1"); 931control.Columns.Add("Column 2", "Column 2"); 932control.Columns.Add("Column 3", "Column 3"); 933control.Columns[0].DisplayIndex = 2; 934control.Columns[1].DisplayIndex = 1; 935control.Columns[1].Visible = false; 936control.Columns[2].DisplayIndex = 0; 938AccessibleObject accessibleObject1 = control.Columns[2].HeaderCell.AccessibilityObject; 939AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject; 953control.Columns.Add("Column 1", "Column 1"); 954control.Columns.Add("Column 2", "Column 2"); 955control.Columns.Add("Column 3", "Column 3"); 956control.Columns[0].DisplayIndex = 2; 957control.Columns[1].DisplayIndex = 1; 958control.Columns[2].DisplayIndex = 0; 959control.Columns[2].Visible = false; 961AccessibleObject accessibleObject2 = control.Columns[1].HeaderCell.AccessibilityObject; 962AccessibleObject accessibleObject3 = control.Columns[0].HeaderCell.AccessibilityObject;
System\Windows\Forms\AccessibleObjects\DataGridViewComboBoxCellAccessibleObjectTests.cs (2)
29dataGridView.Columns.Add(new DataGridViewComboBoxColumn() { DisplayStyle = displayStyle }); 63dataGridView.Columns.Add(new DataGridViewComboBoxColumn() { DisplayStyle = displayStyle });
System\Windows\Forms\AccessibleObjects\DataGridViewComboBoxEditingControlAccessibleObjectTests.cs (1)
119control.Columns.Add(new DataGridViewComboBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (356)
81dataGridView.Columns.Add("Column 1", "Column 1"); 101dataGridView.Columns.Add("Column 1", "Column 1"); 122dataGridView.Columns.Add("Column 1", "Column 1"); 143dataGridView.Columns.Add("Column 1", "Column 1"); 411dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 440dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 467dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 494dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 521dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 544dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 565dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 586dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 607dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 633dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 658dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 683dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 708dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 734dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 758dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 782dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 806dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 835dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 862dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 889dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 916dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 939dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 960dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 981dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1002dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1028dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1053dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1078dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1103dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1129dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1153dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1177dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 1201dataGridView.Columns.Add("Column 1", "Column 1"); 1202dataGridView.Columns[0].Visible = false; 1216dataGridView.Columns.Add("Column 1", "Column 1"); 1217dataGridView.Columns[0].Visible = false; 1230dataGridView.Columns.Add("Column 1", "Column 1"); 1231dataGridView.Columns.Add("Column 2", "Column 2"); 1232dataGridView.Columns.Add("Column 3", "Column 3"); 1233dataGridView.Columns[0].Visible = false; 1248dataGridView.Columns.Add("Column 1", "Column 1"); 1249dataGridView.Columns.Add("Column 2", "Column 2"); 1250dataGridView.Columns.Add("Column 3", "Column 3"); 1251dataGridView.Columns[1].Visible = false; 1266dataGridView.Columns.Add("Column 1", "Column 1"); 1267dataGridView.Columns.Add("Column 2", "Column 2"); 1268dataGridView.Columns.Add("Column 3", "Column 3"); 1269dataGridView.Columns[2].Visible = false; 1284dataGridView.Columns.Add("Column 1", "Column 1"); 1285dataGridView.Columns.Add("Column 2", "Column 2"); 1286dataGridView.Columns.Add("Column 3", "Column 3"); 1287dataGridView.Columns[0].Visible = false; 1288dataGridView.Columns[1].Visible = false; 1289dataGridView.Columns[2].Visible = false; 1302dataGridView.Columns.Add("Column 1", "Column 1"); 1303dataGridView.Columns.Add("Column 2", "Column 2"); 1304dataGridView.Columns.Add("Column 3", "Column 3"); 1305dataGridView.Columns[0].Visible = false; 1320dataGridView.Columns.Add("Column 1", "Column 1"); 1321dataGridView.Columns.Add("Column 2", "Column 2"); 1322dataGridView.Columns.Add("Column 3", "Column 3"); 1323dataGridView.Columns[1].Visible = false; 1338dataGridView.Columns.Add("Column 1", "Column 1"); 1339dataGridView.Columns.Add("Column 2", "Column 2"); 1340dataGridView.Columns.Add("Column 3", "Column 3"); 1341dataGridView.Columns[2].Visible = false; 1356dataGridView.Columns.Add("Column 1", "Column 1"); 1357dataGridView.Columns.Add("Column 2", "Column 2"); 1358dataGridView.Columns.Add("Column 3", "Column 3"); 1359dataGridView.Columns[0].Visible = false; 1360dataGridView.Columns[1].Visible = false; 1361dataGridView.Columns[2].Visible = false; 1375dataGridView.Columns.Add("Column 1", "Column 1"); 1376dataGridView.Columns.Add("Column 2", "Column 2"); 1377dataGridView.Columns.Add("Column 3", "Column 3"); 1378dataGridView.Columns[0].DisplayIndex = 2; 1379dataGridView.Columns[1].DisplayIndex = 1; 1380dataGridView.Columns[2].DisplayIndex = 0; 1395dataGridView.Columns.Add("Column 1", "Column 1"); 1396dataGridView.Columns.Add("Column 2", "Column 2"); 1397dataGridView.Columns.Add("Column 3", "Column 3"); 1398dataGridView.Columns[0].DisplayIndex = 2; 1399dataGridView.Columns[1].DisplayIndex = 1; 1400dataGridView.Columns[2].DisplayIndex = 0; 1401dataGridView.Columns[0].Visible = false; 1416dataGridView.Columns.Add("Column 1", "Column 1"); 1417dataGridView.Columns.Add("Column 2", "Column 2"); 1418dataGridView.Columns.Add("Column 3", "Column 3"); 1419dataGridView.Columns[0].DisplayIndex = 2; 1420dataGridView.Columns[1].DisplayIndex = 1; 1421dataGridView.Columns[2].DisplayIndex = 0; 1422dataGridView.Columns[1].Visible = false; 1437dataGridView.Columns.Add("Column 1", "Column 1"); 1438dataGridView.Columns.Add("Column 2", "Column 2"); 1439dataGridView.Columns.Add("Column 3", "Column 3"); 1440dataGridView.Columns[0].DisplayIndex = 2; 1441dataGridView.Columns[1].DisplayIndex = 1; 1442dataGridView.Columns[2].DisplayIndex = 0; 1443dataGridView.Columns[2].Visible = false; 1458dataGridView.Columns.Add("Column 1", "Column 1"); 1459dataGridView.Columns.Add("Column 2", "Column 2"); 1460dataGridView.Columns.Add("Column 3", "Column 3"); 1461dataGridView.Columns[0].DisplayIndex = 2; 1462dataGridView.Columns[1].DisplayIndex = 1; 1463dataGridView.Columns[2].DisplayIndex = 0; 1478dataGridView.Columns.Add("Column 1", "Column 1"); 1479dataGridView.Columns.Add("Column 2", "Column 2"); 1480dataGridView.Columns.Add("Column 3", "Column 3"); 1481dataGridView.Columns[0].DisplayIndex = 2; 1482dataGridView.Columns[1].DisplayIndex = 1; 1483dataGridView.Columns[2].DisplayIndex = 0; 1484dataGridView.Columns[0].Visible = false; 1499dataGridView.Columns.Add("Column 1", "Column 1"); 1500dataGridView.Columns.Add("Column 2", "Column 2"); 1501dataGridView.Columns.Add("Column 3", "Column 3"); 1502dataGridView.Columns[0].DisplayIndex = 2; 1503dataGridView.Columns[1].DisplayIndex = 1; 1504dataGridView.Columns[2].DisplayIndex = 0; 1505dataGridView.Columns[1].Visible = false; 1520dataGridView.Columns.Add("Column 1", "Column 1"); 1521dataGridView.Columns.Add("Column 2", "Column 2"); 1522dataGridView.Columns.Add("Column 3", "Column 3"); 1523dataGridView.Columns[0].DisplayIndex = 2; 1524dataGridView.Columns[1].DisplayIndex = 1; 1525dataGridView.Columns[2].DisplayIndex = 0; 1526dataGridView.Columns[2].Visible = false; 1541dataGridView.Columns.Add("Column 1", "Column 1"); 1542dataGridView.Columns[0].Visible = false; 1555dataGridView.Columns.Add("Column 1", "Column 1"); 1556dataGridView.Columns.Add("Column 2", "Column 2"); 1557dataGridView.Columns.Add("Column 3", "Column 3"); 1558dataGridView.Columns[0].Visible = false; 1573dataGridView.Columns.Add("Column 1", "Column 1"); 1574dataGridView.Columns.Add("Column 2", "Column 2"); 1575dataGridView.Columns.Add("Column 3", "Column 3"); 1576dataGridView.Columns[1].Visible = false; 1591dataGridView.Columns.Add("Column 1", "Column 1"); 1592dataGridView.Columns.Add("Column 2", "Column 2"); 1593dataGridView.Columns.Add("Column 3", "Column 3"); 1594dataGridView.Columns[2].Visible = false; 1609dataGridView.Columns.Add("Column 1", "Column 1"); 1610dataGridView.Columns.Add("Column 2", "Column 2"); 1611dataGridView.Columns.Add("Column 3", "Column 3"); 1612dataGridView.Columns[0].Visible = false; 1613dataGridView.Columns[1].Visible = false; 1614dataGridView.Columns[2].Visible = false; 1627dataGridView.Columns.Add("Column 1", "Column 1"); 1628dataGridView.Columns.Add("Column 2", "Column 2"); 1629dataGridView.Columns.Add("Column 3", "Column 3"); 1630dataGridView.Columns[0].Visible = false; 1645dataGridView.Columns.Add("Column 1", "Column 1"); 1646dataGridView.Columns.Add("Column 2", "Column 2"); 1647dataGridView.Columns.Add("Column 3", "Column 3"); 1648dataGridView.Columns[1].Visible = false; 1663dataGridView.Columns.Add("Column 1", "Column 1"); 1664dataGridView.Columns.Add("Column 2", "Column 2"); 1665dataGridView.Columns.Add("Column 3", "Column 3"); 1666dataGridView.Columns[2].Visible = false; 1681dataGridView.Columns.Add("Column 1", "Column 1"); 1682dataGridView.Columns.Add("Column 2", "Column 2"); 1683dataGridView.Columns.Add("Column 3", "Column 3"); 1684dataGridView.Columns[0].Visible = false; 1685dataGridView.Columns[1].Visible = false; 1686dataGridView.Columns[2].Visible = false; 1700dataGridView.Columns.Add("Column 1", "Column 1"); 1701dataGridView.Columns.Add("Column 2", "Column 2"); 1702dataGridView.Columns.Add("Column 3", "Column 3"); 1703dataGridView.Columns[0].DisplayIndex = 2; 1704dataGridView.Columns[1].DisplayIndex = 1; 1705dataGridView.Columns[2].DisplayIndex = 0; 1720dataGridView.Columns.Add("Column 1", "Column 1"); 1721dataGridView.Columns.Add("Column 2", "Column 2"); 1722dataGridView.Columns.Add("Column 3", "Column 3"); 1723dataGridView.Columns[0].DisplayIndex = 2; 1724dataGridView.Columns[1].DisplayIndex = 1; 1725dataGridView.Columns[2].DisplayIndex = 0; 1726dataGridView.Columns[0].Visible = false; 1741dataGridView.Columns.Add("Column 1", "Column 1"); 1742dataGridView.Columns.Add("Column 2", "Column 2"); 1743dataGridView.Columns.Add("Column 3", "Column 3"); 1744dataGridView.Columns[0].DisplayIndex = 2; 1745dataGridView.Columns[1].DisplayIndex = 1; 1746dataGridView.Columns[2].DisplayIndex = 0; 1747dataGridView.Columns[1].Visible = false; 1762dataGridView.Columns.Add("Column 1", "Column 1"); 1763dataGridView.Columns.Add("Column 2", "Column 2"); 1764dataGridView.Columns.Add("Column 3", "Column 3"); 1765dataGridView.Columns[0].DisplayIndex = 2; 1766dataGridView.Columns[1].DisplayIndex = 1; 1767dataGridView.Columns[2].DisplayIndex = 0; 1768dataGridView.Columns[2].Visible = false; 1783dataGridView.Columns.Add("Column 1", "Column 1"); 1784dataGridView.Columns.Add("Column 2", "Column 2"); 1785dataGridView.Columns.Add("Column 3", "Column 3"); 1786dataGridView.Columns[0].DisplayIndex = 2; 1787dataGridView.Columns[1].DisplayIndex = 1; 1788dataGridView.Columns[2].DisplayIndex = 0; 1803dataGridView.Columns.Add("Column 1", "Column 1"); 1804dataGridView.Columns.Add("Column 2", "Column 2"); 1805dataGridView.Columns.Add("Column 3", "Column 3"); 1806dataGridView.Columns[0].DisplayIndex = 2; 1807dataGridView.Columns[1].DisplayIndex = 1; 1808dataGridView.Columns[2].DisplayIndex = 0; 1809dataGridView.Columns[0].Visible = false; 1824dataGridView.Columns.Add("Column 1", "Column 1"); 1825dataGridView.Columns.Add("Column 2", "Column 2"); 1826dataGridView.Columns.Add("Column 3", "Column 3"); 1827dataGridView.Columns[0].DisplayIndex = 2; 1828dataGridView.Columns[1].DisplayIndex = 1; 1829dataGridView.Columns[2].DisplayIndex = 0; 1830dataGridView.Columns[1].Visible = false; 1845dataGridView.Columns.Add("Column 1", "Column 1"); 1846dataGridView.Columns.Add("Column 2", "Column 2"); 1847dataGridView.Columns.Add("Column 3", "Column 3"); 1848dataGridView.Columns[0].DisplayIndex = 2; 1849dataGridView.Columns[1].DisplayIndex = 1; 1850dataGridView.Columns[2].DisplayIndex = 0; 1851dataGridView.Columns[2].Visible = false; 1866dataGridView.Columns.Add("Column 1", "Column 1"); 1867dataGridView.Columns.Add("Column 2", "Column 2"); 1868dataGridView.Columns.Add("Column 3", "Column 3"); 1869dataGridView.Columns[0].Visible = false; 1870dataGridView.Columns[1].Visible = false; 1871dataGridView.Columns[2].Visible = false; 1885dataGridView.Columns.Add("Column 1", "Column 1"); 1886dataGridView.Columns.Add("Column 2", "Column 2"); 1887dataGridView.Columns.Add("Column 3", "Column 3"); 1905dataGridView.Columns.Add("Column 1", "Column 1"); 1906dataGridView.Columns.Add("Column 2", "Column 2"); 1907dataGridView.Columns.Add("Column 3", "Column 3"); 1908dataGridView.Columns[0].Visible = false; 1924dataGridView.Columns.Add("Column 1", "Column 1"); 1925dataGridView.Columns.Add("Column 2", "Column 2"); 1926dataGridView.Columns.Add("Column 3", "Column 3"); 1927dataGridView.Columns[1].Visible = false; 1943dataGridView.Columns.Add("Column 1", "Column 1"); 1944dataGridView.Columns.Add("Column 2", "Column 2"); 1945dataGridView.Columns.Add("Column 3", "Column 3"); 1946dataGridView.Columns[2].Visible = false; 1962dataGridView.Columns.Add("Column 1", "Column 1"); 1963dataGridView.Columns.Add("Column 2", "Column 2"); 1964dataGridView.Columns.Add("Column 3", "Column 3"); 1984dataGridView.Columns.Add("Column 1", "Column 1"); 1985dataGridView.Columns.Add("Column 2", "Column 2"); 1986dataGridView.Columns.Add("Column 3", "Column 3"); 1987dataGridView.Columns[0].Visible = false; 1988dataGridView.Columns[1].Visible = false; 1989dataGridView.Columns[2].Visible = false; 2004dataGridView.Columns.Add("Column 1", "Column 1"); 2005dataGridView.Columns.Add("Column 2", "Column 2"); 2006dataGridView.Columns.Add("Column 3", "Column 3"); 2007dataGridView.Columns[0].Visible = false; 2025dataGridView.Columns.Add("Column 1", "Column 1"); 2026dataGridView.Columns.Add("Column 2", "Column 2"); 2027dataGridView.Columns.Add("Column 3", "Column 3"); 2028dataGridView.Columns[1].Visible = false; 2046dataGridView.Columns.Add("Column 1", "Column 1"); 2047dataGridView.Columns.Add("Column 2", "Column 2"); 2048dataGridView.Columns.Add("Column 3", "Column 3"); 2049dataGridView.Columns[2].Visible = false; 2067dataGridView.Columns.Add("Column 1", "Column 1"); 2068dataGridView.Columns.Add("Column 2", "Column 2"); 2069dataGridView.Columns.Add("Column 3", "Column 3"); 2070dataGridView.Columns[0].DisplayIndex = 2; 2071dataGridView.Columns[1].DisplayIndex = 1; 2072dataGridView.Columns[2].DisplayIndex = 0; 2090dataGridView.Columns.Add("Column 1", "Column 1"); 2091dataGridView.Columns.Add("Column 2", "Column 2"); 2092dataGridView.Columns.Add("Column 3", "Column 3"); 2093dataGridView.Columns[0].DisplayIndex = 2; 2094dataGridView.Columns[1].DisplayIndex = 1; 2095dataGridView.Columns[2].DisplayIndex = 0; 2096dataGridView.Columns[0].Visible = false; 2112dataGridView.Columns.Add("Column 1", "Column 1"); 2113dataGridView.Columns.Add("Column 2", "Column 2"); 2114dataGridView.Columns.Add("Column 3", "Column 3"); 2115dataGridView.Columns[0].DisplayIndex = 2; 2116dataGridView.Columns[1].DisplayIndex = 1; 2117dataGridView.Columns[2].DisplayIndex = 0; 2118dataGridView.Columns[1].Visible = false; 2134dataGridView.Columns.Add("Column 1", "Column 1"); 2135dataGridView.Columns.Add("Column 2", "Column 2"); 2136dataGridView.Columns.Add("Column 3", "Column 3"); 2137dataGridView.Columns[0].DisplayIndex = 2; 2138dataGridView.Columns[1].DisplayIndex = 1; 2139dataGridView.Columns[2].DisplayIndex = 0; 2140dataGridView.Columns[2].Visible = false; 2156dataGridView.Columns.Add("Column 1", "Column 1"); 2157dataGridView.Columns.Add("Column 2", "Column 2"); 2158dataGridView.Columns.Add("Column 3", "Column 3"); 2159dataGridView.Columns[0].DisplayIndex = 2; 2160dataGridView.Columns[1].DisplayIndex = 1; 2161dataGridView.Columns[2].DisplayIndex = 0; 2181dataGridView.Columns.Add("Column 1", "Column 1"); 2182dataGridView.Columns.Add("Column 2", "Column 2"); 2183dataGridView.Columns.Add("Column 3", "Column 3"); 2184dataGridView.Columns[0].DisplayIndex = 2; 2185dataGridView.Columns[1].DisplayIndex = 1; 2186dataGridView.Columns[2].DisplayIndex = 0; 2187dataGridView.Columns[0].Visible = false; 2205dataGridView.Columns.Add("Column 1", "Column 1"); 2206dataGridView.Columns.Add("Column 2", "Column 2"); 2207dataGridView.Columns.Add("Column 3", "Column 3"); 2208dataGridView.Columns[0].DisplayIndex = 2; 2209dataGridView.Columns[1].DisplayIndex = 1; 2210dataGridView.Columns[2].DisplayIndex = 0; 2211dataGridView.Columns[1].Visible = false; 2229dataGridView.Columns.Add("Column 1", "Column 1"); 2230dataGridView.Columns.Add("Column 2", "Column 2"); 2231dataGridView.Columns.Add("Column 3", "Column 3"); 2232dataGridView.Columns[0].DisplayIndex = 2; 2233dataGridView.Columns[1].DisplayIndex = 1; 2234dataGridView.Columns[2].DisplayIndex = 0; 2235dataGridView.Columns[2].Visible = false; 2253dataGridView.Columns.Add("Column 1", "Column 1"); 2254dataGridView.Columns.Add("Column 2", "Column 2"); 2255dataGridView.Columns.Add("Column 3", "Column 3"); 2267dataGridView.Columns.Add("Column 1", "Column 1"); 2268dataGridView.Columns.Add("Column 2", "Column 2"); 2269dataGridView.Columns.Add("Column 3", "Column 3"); 2270dataGridView.Columns[0].Visible = false; 2282dataGridView.Columns.Add("Column 1", "Column 1"); 2283dataGridView.Columns.Add("Column 2", "Column 2"); 2284dataGridView.Columns.Add("Column 3", "Column 3"); 2285dataGridView.Columns[0].Visible = false; 2286dataGridView.Columns[1].Visible = false; 2298dataGridView.Columns.Add("Column 1", "Column 1"); 2299dataGridView.Columns.Add("Column 2", "Column 2"); 2300dataGridView.Columns.Add("Column 3", "Column 3"); 2301dataGridView.Columns[0].Visible = false; 2302dataGridView.Columns[1].Visible = false; 2303dataGridView.Columns[2].Visible = false; 2315dataGridView.Columns.Add("Column 1", "Column 1"); 2316dataGridView.Columns.Add("Column 2", "Column 2"); 2317dataGridView.Columns.Add("Column 3", "Column 3"); 2329dataGridView.Columns.Add("Column 1", "Column 1"); 2330dataGridView.Columns.Add("Column 2", "Column 2"); 2331dataGridView.Columns.Add("Column 3", "Column 3"); 2332dataGridView.Columns[0].Visible = false; 2344dataGridView.Columns.Add("Column 1", "Column 1"); 2345dataGridView.Columns.Add("Column 2", "Column 2"); 2346dataGridView.Columns.Add("Column 3", "Column 3"); 2347dataGridView.Columns[0].Visible = false; 2348dataGridView.Columns[1].Visible = false; 2360dataGridView.Columns.Add("Column 1", "Column 1"); 2361dataGridView.Columns.Add("Column 2", "Column 2"); 2362dataGridView.Columns.Add("Column 3", "Column 3"); 2363dataGridView.Columns[0].Visible = false; 2364dataGridView.Columns[1].Visible = false; 2365dataGridView.Columns[2].Visible = false; 2382dataGridView.Columns.Add(column); 2398dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (13)
30control.Columns.Add("Column 1", "Header text 1"); 57control.Columns.Add("Column 1", "Header text 1"); 77control.Columns.Add("Column 1", "Header text 1"); 93control.Columns.Add("Column 1", "Header text 1"); 113control.Columns.Add("Column 1", "Header text 1"); 128control.Columns.Add("Column 1", "Header text 1"); 183control.Columns[0].Visible = false; 200control.Columns[0].DisplayIndex = 1; 201control.Columns[1].DisplayIndex = 0; 218control.Columns[0].DisplayIndex = 1; 219control.Columns[1].DisplayIndex = 0; 220control.Columns[1].Visible = false; 268dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedCellsAccessibleObjectTests.cs (11)
80control.Columns.Add("Column 1", "Header text 1"); 99control.Columns.Add("Column 1", "Header text 1"); 118control.Columns.Add("Column 1", "Header text 1"); 119control.Columns.Add("Column 2", "Header text 2"); 120control.Columns.Add("Column 3", "Header text 3"); 140control.Columns.Add("Column 1", "Header text 1"); 141control.Columns.Add("Column 2", "Header text 2"); 177control.Columns.Add("Column 1", "Header text 1"); 178control.Columns.Add("Column 2", "Header text 2"); 198control.Columns.Add("Column 1", "Header text 1"); 199control.Columns.Add("Column 2", "Header text 2");
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedRowCellsAccessibleObjectTests.cs (13)
58control.Columns.Add("Column 1", "Header text 1"); 83control.Columns.Add("Column 1", "Header text 1"); 102control.Columns.Add("Column 1", "Header text 1"); 121control.Columns.Add("Column 1", "Header text 1"); 122control.Columns.Add("Column 2", "Header text 2"); 123control.Columns.Add("Column 3", "Header text 3"); 145control.Columns.Add("Column 1", "Header text 1"); 146control.Columns.Add("Column 2", "Header text 2"); 168control.Columns.Add("Column 1", "Header text 1"); 184control.Columns.Add("Column 1", "Header text 1"); 185control.Columns.Add("Column 2", "Header text 2"); 206control.Columns.Add("Column 1", "Header text 1"); 207control.Columns.Add("Column 2", "Header text 2");
System\Windows\Forms\AccessibleObjects\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObjectTests.cs (1)
143control.Columns.Add(new DataGridViewTextBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewTopLeftHeaderCellAccessibleObjectTests.cs (12)
229control.Columns.Add(new DataGridViewTextBoxColumn()); 233AccessibleObject expected = control.Columns[0].HeaderCell.AccessibilityObject; 306control.Columns[0].Visible = false; 311AccessibleObject expected = control.Columns[1].HeaderCell.AccessibilityObject; 324control.Columns[0].DisplayIndex = 1; 325control.Columns[1].DisplayIndex = 0; 330AccessibleObject expected = control.Columns[1].HeaderCell.AccessibilityObject; 343control.Columns[0].DisplayIndex = 1; 344control.Columns[1].DisplayIndex = 0; 345control.Columns[1].Visible = false; 350AccessibleObject expected = control.Columns[0].HeaderCell.AccessibilityObject; 379dataGridView.Columns.Add(new DataGridViewTextBoxColumn());
System\Windows\Forms\AccessibleObjects\DataGridViewTopRowAccessibleObjectTests.cs (404)
18dataGridView.Columns.Add(dataGridViewColumn); 23AccessibleObject expectedLastChild = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 39dataGridView.Columns.Add(dataGridViewColumn); 43AccessibleObject expectedLastChild = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 73dataGridView.Columns.Add("Column 1", "Column 1"); 74dataGridView.Columns.Add("Column 2", "Column 2"); 75dataGridView.Columns.Add("Column 3", "Column 3"); 78AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 79AccessibleObject accessibleObject2 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 90dataGridView.Columns.Add("Column 1", "Column 1"); 91dataGridView.Columns.Add("Column 2", "Column 2"); 92dataGridView.Columns.Add("Column 3", "Column 3"); 93dataGridView.Columns[0].Visible = false; 96AccessibleObject accessibleObject1 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 97AccessibleObject accessibleObject2 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 108dataGridView.Columns.Add("Column 1", "Column 1"); 109dataGridView.Columns.Add("Column 2", "Column 2"); 110dataGridView.Columns.Add("Column 3", "Column 3"); 111dataGridView.Columns[1].Visible = false; 114AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 115AccessibleObject accessibleObject2 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 126dataGridView.Columns.Add("Column 1", "Column 1"); 127dataGridView.Columns.Add("Column 2", "Column 2"); 128dataGridView.Columns.Add("Column 3", "Column 3"); 129dataGridView.Columns[2].Visible = false; 132AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 133AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 144dataGridView.Columns.Add("Column 1", "Column 1"); 145dataGridView.Columns.Add("Column 2", "Column 2"); 146dataGridView.Columns.Add("Column 3", "Column 3"); 147dataGridView.Columns[0].Visible = false; 148dataGridView.Columns[1].Visible = false; 149dataGridView.Columns[2].Visible = false; 162dataGridView.Columns.Add("Column 1", "Column 1"); 163dataGridView.Columns.Add("Column 2", "Column 2"); 164dataGridView.Columns.Add("Column 3", "Column 3"); 165dataGridView.Columns[0].Visible = false; 169AccessibleObject accessibleObject = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 180dataGridView.Columns.Add("Column 1", "Column 1"); 181dataGridView.Columns.Add("Column 2", "Column 2"); 182dataGridView.Columns.Add("Column 3", "Column 3"); 183dataGridView.Columns[1].Visible = false; 187AccessibleObject accessibleObject = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 198dataGridView.Columns.Add("Column 1", "Column 1"); 199dataGridView.Columns.Add("Column 2", "Column 2"); 200dataGridView.Columns.Add("Column 3", "Column 3"); 201dataGridView.Columns[2].Visible = false; 205AccessibleObject accessibleObject = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 216dataGridView.Columns.Add("Column 1", "Column 1"); 217dataGridView.Columns.Add("Column 2", "Column 2"); 218dataGridView.Columns.Add("Column 3", "Column 3"); 219dataGridView.Columns[0].Visible = false; 220dataGridView.Columns[1].Visible = false; 221dataGridView.Columns[2].Visible = false; 235dataGridView.Columns.Add("Column 1", "Column 1"); 236dataGridView.Columns.Add("Column 2", "Column 2"); 237dataGridView.Columns.Add("Column 3", "Column 3"); 238dataGridView.Columns[0].DisplayIndex = 2; 239dataGridView.Columns[1].DisplayIndex = 1; 240dataGridView.Columns[2].DisplayIndex = 0; 243AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 244AccessibleObject accessibleObject2 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 255dataGridView.Columns.Add("Column 1", "Column 1"); 256dataGridView.Columns.Add("Column 2", "Column 2"); 257dataGridView.Columns.Add("Column 3", "Column 3"); 258dataGridView.Columns[0].DisplayIndex = 2; 259dataGridView.Columns[1].DisplayIndex = 1; 260dataGridView.Columns[2].DisplayIndex = 0; 261dataGridView.Columns[0].Visible = false; 264AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 265AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 276dataGridView.Columns.Add("Column 1", "Column 1"); 277dataGridView.Columns.Add("Column 2", "Column 2"); 278dataGridView.Columns.Add("Column 3", "Column 3"); 279dataGridView.Columns[0].DisplayIndex = 2; 280dataGridView.Columns[1].DisplayIndex = 1; 281dataGridView.Columns[2].DisplayIndex = 0; 282dataGridView.Columns[1].Visible = false; 285AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 286AccessibleObject accessibleObject2 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 297dataGridView.Columns.Add("Column 1", "Column 1"); 298dataGridView.Columns.Add("Column 2", "Column 2"); 299dataGridView.Columns.Add("Column 3", "Column 3"); 300dataGridView.Columns[0].DisplayIndex = 2; 301dataGridView.Columns[1].DisplayIndex = 1; 302dataGridView.Columns[2].DisplayIndex = 0; 303dataGridView.Columns[2].Visible = false; 306AccessibleObject accessibleObject1 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 307AccessibleObject accessibleObject2 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 318dataGridView.Columns.Add("Column 1", "Column 1"); 319dataGridView.Columns.Add("Column 2", "Column 2"); 320dataGridView.Columns.Add("Column 3", "Column 3"); 321dataGridView.Columns[0].DisplayIndex = 2; 322dataGridView.Columns[1].DisplayIndex = 1; 323dataGridView.Columns[2].DisplayIndex = 0; 327AccessibleObject accessibleObject = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 338dataGridView.Columns.Add("Column 1", "Column 1"); 339dataGridView.Columns.Add("Column 2", "Column 2"); 340dataGridView.Columns.Add("Column 3", "Column 3"); 341dataGridView.Columns[0].DisplayIndex = 2; 342dataGridView.Columns[1].DisplayIndex = 1; 343dataGridView.Columns[2].DisplayIndex = 0; 344dataGridView.Columns[0].Visible = false; 348AccessibleObject accessibleObject = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 359dataGridView.Columns.Add("Column 1", "Column 1"); 360dataGridView.Columns.Add("Column 2", "Column 2"); 361dataGridView.Columns.Add("Column 3", "Column 3"); 362dataGridView.Columns[0].DisplayIndex = 2; 363dataGridView.Columns[1].DisplayIndex = 1; 364dataGridView.Columns[2].DisplayIndex = 0; 365dataGridView.Columns[1].Visible = false; 369AccessibleObject accessibleObject = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 380dataGridView.Columns.Add("Column 1", "Column 1"); 381dataGridView.Columns.Add("Column 2", "Column 2"); 382dataGridView.Columns.Add("Column 3", "Column 3"); 383dataGridView.Columns[0].DisplayIndex = 2; 384dataGridView.Columns[1].DisplayIndex = 1; 385dataGridView.Columns[2].DisplayIndex = 0; 386dataGridView.Columns[2].Visible = false; 390AccessibleObject accessibleObject = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 401dataGridView.Columns.Add("Column 1", "Column 1"); 402dataGridView.Columns.Add("Column 2", "Column 2"); 403dataGridView.Columns.Add("Column 3", "Column 3"); 406AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 407AccessibleObject accessibleObject2 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 418dataGridView.Columns.Add("Column 1", "Column 1"); 419dataGridView.Columns.Add("Column 2", "Column 2"); 420dataGridView.Columns.Add("Column 3", "Column 3"); 421dataGridView.Columns[0].Visible = false; 424AccessibleObject accessibleObject1 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 425AccessibleObject accessibleObject2 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 436dataGridView.Columns.Add("Column 1", "Column 1"); 437dataGridView.Columns.Add("Column 2", "Column 2"); 438dataGridView.Columns.Add("Column 3", "Column 3"); 439dataGridView.Columns[1].Visible = false; 442AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 443AccessibleObject accessibleObject2 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 454dataGridView.Columns.Add("Column 1", "Column 1"); 455dataGridView.Columns.Add("Column 2", "Column 2"); 456dataGridView.Columns.Add("Column 3", "Column 3"); 457dataGridView.Columns[2].Visible = false; 460AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 461AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 472dataGridView.Columns.Add("Column 1", "Column 1"); 473dataGridView.Columns.Add("Column 2", "Column 2"); 474dataGridView.Columns.Add("Column 3", "Column 3"); 475dataGridView.Columns[0].Visible = false; 476dataGridView.Columns[1].Visible = false; 477dataGridView.Columns[2].Visible = false; 490dataGridView.Columns.Add("Column 1", "Column 1"); 491dataGridView.Columns.Add("Column 2", "Column 2"); 492dataGridView.Columns.Add("Column 3", "Column 3"); 493dataGridView.Columns[0].Visible = false; 497AccessibleObject accessibleObject = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 508dataGridView.Columns.Add("Column 1", "Column 1"); 509dataGridView.Columns.Add("Column 2", "Column 2"); 510dataGridView.Columns.Add("Column 3", "Column 3"); 511dataGridView.Columns[1].Visible = false; 515AccessibleObject accessibleObject = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 526dataGridView.Columns.Add("Column 1", "Column 1"); 527dataGridView.Columns.Add("Column 2", "Column 2"); 528dataGridView.Columns.Add("Column 3", "Column 3"); 529dataGridView.Columns[2].Visible = false; 533AccessibleObject accessibleObject = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 544dataGridView.Columns.Add("Column 1", "Column 1"); 545dataGridView.Columns.Add("Column 2", "Column 2"); 546dataGridView.Columns.Add("Column 3", "Column 3"); 547dataGridView.Columns[0].Visible = false; 548dataGridView.Columns[1].Visible = false; 549dataGridView.Columns[2].Visible = false; 563dataGridView.Columns.Add("Column 1", "Column 1"); 564dataGridView.Columns.Add("Column 2", "Column 2"); 565dataGridView.Columns.Add("Column 3", "Column 3"); 566dataGridView.Columns[0].DisplayIndex = 2; 567dataGridView.Columns[1].DisplayIndex = 1; 568dataGridView.Columns[2].DisplayIndex = 0; 571AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 572AccessibleObject accessibleObject2 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 583dataGridView.Columns.Add("Column 1", "Column 1"); 584dataGridView.Columns.Add("Column 2", "Column 2"); 585dataGridView.Columns.Add("Column 3", "Column 3"); 586dataGridView.Columns[0].DisplayIndex = 2; 587dataGridView.Columns[1].DisplayIndex = 1; 588dataGridView.Columns[2].DisplayIndex = 0; 589dataGridView.Columns[0].Visible = false; 592AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 593AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 604dataGridView.Columns.Add("Column 1", "Column 1"); 605dataGridView.Columns.Add("Column 2", "Column 2"); 606dataGridView.Columns.Add("Column 3", "Column 3"); 607dataGridView.Columns[0].DisplayIndex = 2; 608dataGridView.Columns[1].DisplayIndex = 1; 609dataGridView.Columns[2].DisplayIndex = 0; 610dataGridView.Columns[1].Visible = false; 613AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 614AccessibleObject accessibleObject2 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 625dataGridView.Columns.Add("Column 1", "Column 1"); 626dataGridView.Columns.Add("Column 2", "Column 2"); 627dataGridView.Columns.Add("Column 3", "Column 3"); 628dataGridView.Columns[0].DisplayIndex = 2; 629dataGridView.Columns[1].DisplayIndex = 1; 630dataGridView.Columns[2].DisplayIndex = 0; 631dataGridView.Columns[2].Visible = false; 634AccessibleObject accessibleObject1 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 635AccessibleObject accessibleObject2 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 646dataGridView.Columns.Add("Column 1", "Column 1"); 647dataGridView.Columns.Add("Column 2", "Column 2"); 648dataGridView.Columns.Add("Column 3", "Column 3"); 649dataGridView.Columns[0].DisplayIndex = 2; 650dataGridView.Columns[1].DisplayIndex = 1; 651dataGridView.Columns[2].DisplayIndex = 0; 655AccessibleObject accessibleObject = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 666dataGridView.Columns.Add("Column 1", "Column 1"); 667dataGridView.Columns.Add("Column 2", "Column 2"); 668dataGridView.Columns.Add("Column 3", "Column 3"); 669dataGridView.Columns[0].DisplayIndex = 2; 670dataGridView.Columns[1].DisplayIndex = 1; 671dataGridView.Columns[2].DisplayIndex = 0; 672dataGridView.Columns[0].Visible = false; 676AccessibleObject accessibleObject = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 687dataGridView.Columns.Add("Column 1", "Column 1"); 688dataGridView.Columns.Add("Column 2", "Column 2"); 689dataGridView.Columns.Add("Column 3", "Column 3"); 690dataGridView.Columns[0].DisplayIndex = 2; 691dataGridView.Columns[1].DisplayIndex = 1; 692dataGridView.Columns[2].DisplayIndex = 0; 693dataGridView.Columns[1].Visible = false; 697AccessibleObject accessibleObject = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 708dataGridView.Columns.Add("Column 1", "Column 1"); 709dataGridView.Columns.Add("Column 2", "Column 2"); 710dataGridView.Columns.Add("Column 3", "Column 3"); 711dataGridView.Columns[0].DisplayIndex = 2; 712dataGridView.Columns[1].DisplayIndex = 1; 713dataGridView.Columns[2].DisplayIndex = 0; 714dataGridView.Columns[2].Visible = false; 718AccessibleObject accessibleObject = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 729dataGridView.Columns.Add("Column 1", "Column 1"); 730dataGridView.Columns.Add("Column 2", "Column 2"); 731dataGridView.Columns.Add("Column 3", "Column 3"); 732dataGridView.Columns[0].Visible = false; 733dataGridView.Columns[1].Visible = false; 734dataGridView.Columns[2].Visible = false; 748dataGridView.Columns.Add("Column 1", "Column 1"); 749dataGridView.Columns.Add("Column 2", "Column 2"); 750dataGridView.Columns.Add("Column 3", "Column 3"); 753AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 754AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 755AccessibleObject accessibleObject3 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 768dataGridView.Columns.Add("Column 1", "Column 1"); 769dataGridView.Columns.Add("Column 2", "Column 2"); 770dataGridView.Columns.Add("Column 3", "Column 3"); 771dataGridView.Columns[0].Visible = false; 774AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 775AccessibleObject accessibleObject3 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 787dataGridView.Columns.Add("Column 1", "Column 1"); 788dataGridView.Columns.Add("Column 2", "Column 2"); 789dataGridView.Columns.Add("Column 3", "Column 3"); 790dataGridView.Columns[1].Visible = false; 793AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 794AccessibleObject accessibleObject3 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 806dataGridView.Columns.Add("Column 1", "Column 1"); 807dataGridView.Columns.Add("Column 2", "Column 2"); 808dataGridView.Columns.Add("Column 3", "Column 3"); 809dataGridView.Columns[2].Visible = false; 812AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 813AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 825dataGridView.Columns.Add("Column 1", "Column 1"); 826dataGridView.Columns.Add("Column 2", "Column 2"); 827dataGridView.Columns.Add("Column 3", "Column 3"); 831AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 832AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 833AccessibleObject accessibleObject3 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 847dataGridView.Columns.Add("Column 1", "Column 1"); 848dataGridView.Columns.Add("Column 2", "Column 2"); 849dataGridView.Columns.Add("Column 3", "Column 3"); 850dataGridView.Columns[0].Visible = false; 851dataGridView.Columns[1].Visible = false; 852dataGridView.Columns[2].Visible = false; 867dataGridView.Columns.Add("Column 1", "Column 1"); 868dataGridView.Columns.Add("Column 2", "Column 2"); 869dataGridView.Columns.Add("Column 3", "Column 3"); 870dataGridView.Columns[0].Visible = false; 874AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 875AccessibleObject accessibleObject3 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 888dataGridView.Columns.Add("Column 1", "Column 1"); 889dataGridView.Columns.Add("Column 2", "Column 2"); 890dataGridView.Columns.Add("Column 3", "Column 3"); 891dataGridView.Columns[1].Visible = false; 895AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 896AccessibleObject accessibleObject3 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 909dataGridView.Columns.Add("Column 1", "Column 1"); 910dataGridView.Columns.Add("Column 2", "Column 2"); 911dataGridView.Columns.Add("Column 3", "Column 3"); 912dataGridView.Columns[2].Visible = false; 916AccessibleObject accessibleObject1 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 917AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 930dataGridView.Columns.Add("Column 1", "Column 1"); 931dataGridView.Columns.Add("Column 2", "Column 2"); 932dataGridView.Columns.Add("Column 3", "Column 3"); 933dataGridView.Columns[0].DisplayIndex = 2; 934dataGridView.Columns[1].DisplayIndex = 1; 935dataGridView.Columns[2].DisplayIndex = 0; 938AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 939AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 940AccessibleObject accessibleObject3 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 953dataGridView.Columns.Add("Column 1", "Column 1"); 954dataGridView.Columns.Add("Column 2", "Column 2"); 955dataGridView.Columns.Add("Column 3", "Column 3"); 956dataGridView.Columns[0].DisplayIndex = 2; 957dataGridView.Columns[1].DisplayIndex = 1; 958dataGridView.Columns[2].DisplayIndex = 0; 959dataGridView.Columns[0].Visible = false; 962AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 963AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 975dataGridView.Columns.Add("Column 1", "Column 1"); 976dataGridView.Columns.Add("Column 2", "Column 2"); 977dataGridView.Columns.Add("Column 3", "Column 3"); 978dataGridView.Columns[0].DisplayIndex = 2; 979dataGridView.Columns[1].DisplayIndex = 1; 980dataGridView.Columns[2].DisplayIndex = 0; 981dataGridView.Columns[1].Visible = false; 984AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 985AccessibleObject accessibleObject3 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 997dataGridView.Columns.Add("Column 1", "Column 1"); 998dataGridView.Columns.Add("Column 2", "Column 2"); 999dataGridView.Columns.Add("Column 3", "Column 3"); 1000dataGridView.Columns[0].DisplayIndex = 2; 1001dataGridView.Columns[1].DisplayIndex = 1; 1002dataGridView.Columns[2].DisplayIndex = 0; 1003dataGridView.Columns[2].Visible = false; 1006AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 1007AccessibleObject accessibleObject3 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 1019dataGridView.Columns.Add("Column 1", "Column 1"); 1020dataGridView.Columns.Add("Column 2", "Column 2"); 1021dataGridView.Columns.Add("Column 3", "Column 3"); 1022dataGridView.Columns[0].DisplayIndex = 2; 1023dataGridView.Columns[1].DisplayIndex = 1; 1024dataGridView.Columns[2].DisplayIndex = 0; 1028AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 1029AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 1030AccessibleObject accessibleObject3 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 1044dataGridView.Columns.Add("Column 1", "Column 1"); 1045dataGridView.Columns.Add("Column 2", "Column 2"); 1046dataGridView.Columns.Add("Column 3", "Column 3"); 1047dataGridView.Columns[0].DisplayIndex = 2; 1048dataGridView.Columns[1].DisplayIndex = 1; 1049dataGridView.Columns[2].DisplayIndex = 0; 1050dataGridView.Columns[0].Visible = false; 1054AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 1055AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 1068dataGridView.Columns.Add("Column 1", "Column 1"); 1069dataGridView.Columns.Add("Column 2", "Column 2"); 1070dataGridView.Columns.Add("Column 3", "Column 3"); 1071dataGridView.Columns[0].DisplayIndex = 2; 1072dataGridView.Columns[1].DisplayIndex = 1; 1073dataGridView.Columns[2].DisplayIndex = 0; 1074dataGridView.Columns[1].Visible = false; 1078AccessibleObject accessibleObject1 = dataGridView.Columns[2].HeaderCell.AccessibilityObject; 1079AccessibleObject accessibleObject3 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 1092dataGridView.Columns.Add("Column 1", "Column 1"); 1093dataGridView.Columns.Add("Column 2", "Column 2"); 1094dataGridView.Columns.Add("Column 3", "Column 3"); 1095dataGridView.Columns[0].DisplayIndex = 2; 1096dataGridView.Columns[1].DisplayIndex = 1; 1097dataGridView.Columns[2].DisplayIndex = 0; 1098dataGridView.Columns[2].Visible = false; 1102AccessibleObject accessibleObject2 = dataGridView.Columns[1].HeaderCell.AccessibilityObject; 1103AccessibleObject accessibleObject3 = dataGridView.Columns[0].HeaderCell.AccessibilityObject; 1116dataGridView.Columns.Add("Column 1", "Column 1"); 1117dataGridView.Columns.Add("Column 2", "Column 2"); 1118dataGridView.Columns.Add("Column 3", "Column 3"); 1130dataGridView.Columns.Add("Column 1", "Column 1"); 1131dataGridView.Columns.Add("Column 2", "Column 2"); 1132dataGridView.Columns.Add("Column 3", "Column 3"); 1133dataGridView.Columns[0].Visible = false; 1145dataGridView.Columns.Add("Column 1", "Column 1"); 1146dataGridView.Columns.Add("Column 2", "Column 2"); 1147dataGridView.Columns.Add("Column 3", "Column 3"); 1148dataGridView.Columns[0].Visible = false; 1149dataGridView.Columns[1].Visible = false; 1161dataGridView.Columns.Add("Column 1", "Column 1"); 1162dataGridView.Columns.Add("Column 2", "Column 2"); 1163dataGridView.Columns.Add("Column 3", "Column 3"); 1164dataGridView.Columns[0].Visible = false; 1165dataGridView.Columns[1].Visible = false; 1166dataGridView.Columns[2].Visible = false; 1178dataGridView.Columns.Add("Column 1", "Column 1"); 1179dataGridView.Columns.Add("Column 2", "Column 2"); 1180dataGridView.Columns.Add("Column 3", "Column 3"); 1192dataGridView.Columns.Add("Column 1", "Column 1"); 1193dataGridView.Columns.Add("Column 2", "Column 2"); 1194dataGridView.Columns.Add("Column 3", "Column 3"); 1195dataGridView.Columns[0].Visible = false; 1207dataGridView.Columns.Add("Column 1", "Column 1"); 1208dataGridView.Columns.Add("Column 2", "Column 2"); 1209dataGridView.Columns.Add("Column 3", "Column 3"); 1210dataGridView.Columns[0].Visible = false; 1211dataGridView.Columns[1].Visible = false; 1223dataGridView.Columns.Add("Column 1", "Column 1"); 1224dataGridView.Columns.Add("Column 2", "Column 2"); 1225dataGridView.Columns.Add("Column 3", "Column 3"); 1226dataGridView.Columns[0].Visible = false; 1227dataGridView.Columns[1].Visible = false; 1228dataGridView.Columns[2].Visible = false;
System\Windows\Forms\DataGridViewButtonCellTests.cs (24)
66dataGridView.Columns.Add(new DataGridViewButtonColumn()); 80dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 83dataGridView.Columns.Clear(); 105dataGridView.Columns.Add(new DataGridViewButtonColumn()); 119dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 122dataGridView.Columns.Clear(); 134dataGridView.Columns.Add(new DataGridViewButtonColumn()); 149dataGridView.Columns.Add(new DataGridViewButtonColumn()); 163dataGridView.Columns.Add(new DataGridViewButtonColumn()); 191dataGridView.Columns.Add(new DataGridViewButtonColumn()); 204dataGridView.Columns.Add(new DataGridViewButtonColumn()); 228dataGridView.Columns.Add(dataGridViewButtonColumn); 243dataGridView.Columns.Add(dataGridViewButtonColumn); 259dataGridView.Columns.Add(dataGridViewTextBoxColumn); 262dataGridView.Columns.Add(dataGridViewButtonColumn); 327dataGridView.Columns.Add(dataGridViewButtonColumn); 346dataGridView.Columns.Add(dataGridViewButtonColumn); 360dataGridView.Columns.Add(dataGridViewButtonColumn); 385dataGridView.Columns.Add(dataGridViewButtonColumn); 410dataGridView.Columns.Add(dataGridViewButtonColumn); 429dataGridView.Columns.Add(dataGridViewButtonColumn); 446dataGridView.Columns.Add(dataGridViewButtonColumn); 462dataGridView.Columns.Add(new DataGridViewButtonColumn()); 495dataGridView.Columns.Add(new DataGridViewButtonColumn());
System\Windows\Forms\DataGridViewButtonColumnTests.cs (2)
43_dataGridView.Columns.Add(_column); 86_dataGridView.Columns.Add(_column);
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (12)
85dataGridView.Columns.Add("name", "text"); 96dataGridView.Columns.Add("name", "text"); 109dataGridView.Columns.Add("name", "text"); 122dataGridView.Columns.Add("name", "text"); 135dataGridView.Columns.Add("name", "text"); 146dataGridView.Columns.Add("name", "text"); 159dataGridView.Columns.Add("name", "text"); 172dataGridView.Columns.Add("name", "text"); 185dataGridView.Columns.Add("name", "text"); 196dataGridView.Columns.Add("name", "text"); 209dataGridView.Columns.Add("name", "text"); 222dataGridView.Columns.Add("name", "text");
System\Windows\Forms\DataGridViewCellTests.ClipboardTests.cs (4)
66control.Columns.Add(column); 81control.Columns.Add(column); 110control.Columns.Add(column); 128control.Columns.Add(column);
System\Windows\Forms\DataGridViewCellTests.cs (131)
89control.Columns.Add(column); 103control.Columns.Add(column); 285control.Columns.Add(column); 307control.Columns.Add(column); 440control.Columns.Add(column); 482control.Columns.Add(column); 507control.Columns.Add(column); 547control.Columns.Add(column); 644control.Columns.Add(column); 659control.Columns.Add(column); 675control.Columns.Add(column); 689control.Columns.Add(column); 728control.Columns.Add(column); 760control.Columns.Add(column); 774control.Columns.Add(column); 1013control.Columns.Add(column); 1040control.Columns.Add(column); 1068control.Columns.Add(column); 1095control.Columns.Add(column); 1125control.Columns.Add(column); 1168control.Columns.Add(column); 1208control.Columns.Add(column); 1292control.Columns.Add(column); 1307control.Columns.Add(column); 1323control.Columns.Add(column); 1381control.Columns.Add(column); 1400control.Columns.Add(column); 1471control.Columns.Add(column); 1485control.Columns.Add(column); 1503control.Columns.Add(column); 1560control.Columns.Add(column); 1574control.Columns.Add(column); 1626control.Columns.Add(column); 1651control.Columns.Add(column); 1787control.Columns.Add(column); 1832control.Columns.Add(column); 1882control.Columns.Add(column1); 1883control.Columns.Add(column2); 1922control.Columns.Add(column); 1967control.Columns.Add(column); 2020control.Columns.Add(column); 2039control.Columns.Add(column); 2083control.Columns.Add(column); 2102control.Columns.Add(column); 2157control.Columns.Add(column); 2188control.Columns.Add(column); 2205control.Columns.Add(column); 2383control.Columns.Add(column); 2410control.Columns.Add(column); 2433control.Columns.Add(column); 2557control.Columns.Add(column); 2571control.Columns.Add(column); 2687control.Columns.Add(column); 2710control.Columns.Add(column); 2734control.Columns.Add(column); 2757control.Columns.Add(column); 2804control.Columns.Add(column); 2940control.Columns.Add(column); 2965control.Columns.Add(column); 3037control.Columns.Add(column); 3058control.Columns.Add(column); 3256control.Columns.Add(column); 3277control.Columns.Add(column); 3295control.Columns.Add(column); 3481control.Columns.Add(column); 3618control.Columns.Add(column); 3632control.Columns.Add(column); 3649control.Columns.Add(column); 3745control.Columns.Add(column); 3762control.Columns.Add(column); 3780control.Columns.Add(column); 3801control.Columns.Add(column); 3915control.Columns.Add(column); 3944control.Columns.Add(column); 3970control.Columns.Add(column); 4009control.Columns.Add(column); 4048control.Columns.Add(column); 4091control.Columns.Add(column); 4131control.Columns.Add(column); 4257control.Columns.Add(column); 4279control.Columns.Add(column); 4303control.Columns.Add(column); 4394control.Columns.Add(column); 4411control.Columns.Add(column); 4459control.Columns.Add(column); 4501control.Columns.Add(column); 4523control.Columns.Add(column); 4575control.Columns.Add(column); 4609control.Columns.Add(column); 4627control.Columns.Add(column); 4675control.Columns.Add(column); 4692control.Columns.Add(column); 4741control.Columns.Add(column); 4755dataGridView.Columns.Add(column1); 4791control.Columns.Add(column1); 4792control.Columns.Add(column2); 4793control.Columns.Add(column3); 4794control.Columns.Add(column4); 4872control.Columns.Add(column); 4893control.Columns.Add(column); 4919control.Columns.Add(column); 4933control.Columns.Add(column); 5004control.Columns.Add(column); 5019control.Columns.Add(column); 5035control.Columns.Add(column); 5049control.Columns.Add(column); 5070control.Columns.Add(column); 5109control.Columns.Add(column); 5147control.Columns.Add(column); 5186control.Columns.Add(column); 5203control.Columns.Add(column); 5566control.Columns.Add(column); 5603control.Columns.Add(column); 5640control.Columns.Add(column); 5667control.Columns.Add(column); 5694control.Columns.Add(column); 5821control.Columns.Add(column); 5848control.Columns.Add(column); 5875control.Columns.Add(column); 5912control.Columns.Add(column); 5949control.Columns.Add(column); 5976control.Columns.Add(column); 6003control.Columns.Add(column); 6308control.Columns.Add(column); 6330control.Columns.Add(column); 6364control.Columns.Add(column); 6381control.Columns.Add(column); 6420control.Columns.Add(column); 6430dataGridView.Columns.Add(imageColumn); 6448dataGridView.Columns.Add(column); 6519dataGridView.Columns.Add(column);
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (25)
69DataGridViewColumnCollection collection = control.Columns; 113DataGridViewColumnCollection collection = control.Columns; 183DataGridViewColumnCollection collection = control.Columns; 221DataGridViewColumnCollection collection = control.Columns; 259DataGridViewColumnCollection collection = control.Columns; 311DataGridViewColumnCollection collection = control.Columns; 359control.Columns.Add(column1); 360control.Columns.Add(column2); 382control1.Columns.Add(column1); 383control2.Columns.Add(column2); 416DataGridViewColumnCollection collection = control.Columns; 444Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column)); 462Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column)); 470control.Columns.Add(column1); 475Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column2)); 483control.Columns.Add(column1); 488Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column2)); 504control.Columns.Add(column1); 505control.Columns.Add(column2); 511control.Columns.Add(column3); 528control.Columns.Add(column1); 529control.Columns.Add(column2); 534Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column3)); 542Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column)); 553Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column));
System\Windows\Forms\DataGridViewColumnTests.cs (41)
193control.Columns.Add(column); 242control.Columns.Add(column); 268control.Columns.Add(column); 287control.Columns.Add(column); 307control.Columns.Add(column); 323control.Columns.Add(column); 340control.Columns.Add(column); 360control.Columns.Add(column); 452control.Columns.Add(column); 568control.Columns.Add(column); 621control.Columns.Add(column); 685control.Columns.Add(column); 706control.Columns.Add(column); 798control.Columns.Add(column); 827control.Columns.Add(column); 850control.Columns.Add(column); 964control.Columns.Add(column); 986control.Columns.Add(column); 1025control.Columns.Add(column); 1060DataGridViewColumn column = control.Columns[0]; 1081control.Columns.Add(column); 1146control.Columns.Add(column); 1147Assert.False(control.Columns[0].Frozen); 1222control.Columns.Add(column); 1261control.Columns.Add(column1); 1262control.Columns.Add(column2); 1263control.Columns.Add(column3); 1264control.Columns.Add(column4); 1312control.Columns.Add(column); 1389control.Columns.Add(column); 1420control.Columns.Add(column); 1459control.Columns.Add(column); 1486control.Columns.Add(column); 1547control.Columns.Add(column); 1548Assert.True(control.Columns[0].Visible); 1623control.Columns.Add(column); 1662control.Columns.Add(column1); 1663control.Columns.Add(column2); 1664control.Columns.Add(column3); 1665control.Columns.Add(column4); 1713control.Columns.Add(column);
System\Windows\Forms\DataGridViewComboBoxCellTests.cs (5)
226dataGridView.Columns.Add(column); 253dataGridView.Columns.Add(column); 318dataGridView.Columns.Add(column); 335dataGridView.Columns.Add(column); 351dataGridView.Columns.Add(column);
System\Windows\Forms\DataGridViewComboBoxColumnTests.cs (11)
41dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 70dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 99dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 126dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 154dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 182dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 209dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 250dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 277dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 306dataGridView.Columns.Add(_dataGridViewComboBoxColumn); 404dataGridView.Columns.Add(_dataGridViewComboBoxColumn);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (103)
128control.Columns.Add(column); 153control.Columns.Add(column); 176control.Columns.Add(column); 249control.Columns.Add(column); 282control.Columns.Add(column); 318control.Columns.Add(column); 352control.Columns.Add(column); 417control.Columns.Add(column); 501control.Columns.Add(column); 538control.Columns.Add(column); 626control.Columns.Add(column); 648control.Columns.Add(column); 671control.Columns.Add(column); 711control.Columns.Add(column); 771control.Columns.Add(column); 788control.Columns.Add(column); 808control.Columns.Add(column); 841control.Columns.Add(column); 937control.Columns.Add(column); 961control.Columns.Add(column); 1003control.Columns.Add(column); 1057control.Columns.Add(column); 1119control.Columns.Add(column); 1141control.Columns.Add(column); 1164control.Columns.Add(column); 1196control.Columns.Add(column); 1258control.Columns.Add(column); 1276control.Columns.Add(column); 1296control.Columns.Add(column); 1330control.Columns.Add(column); 1380control.Columns.Add(column); 1397control.Columns.Add(column); 1416control.Columns.Add(column); 1614control.Columns.Add(column); 1641control.Columns.Add(column); 1669control.Columns.Add(column); 1698control.Columns.Add(column); 1728control.Columns.Add(column); 1756control.Columns.Add(column); 1908control.Columns.Add(column); 1933control.Columns.Add(column); 1959control.Columns.Add(column); 2008control.Columns.Add(column); 2278control.Columns.Add(column); 2300control.Columns.Add(column); 2362control.Columns.Add(column); 2511control.Columns.Add(column); 2553control.Columns.Add(column); 2576control.Columns.Add(column); 2595control.Columns.Add(column); 2620control.Columns.Add(column); 2663control.Columns.Add(column); 2720control.Columns.Add(column); 2772control.Columns.Add(column); 2806control.Columns.Add(column); 2835control.Columns.Add(column); 2870control.Columns.Add(column); 2923control.Columns.Add(column); 3003control.Columns.Add(column); 3053control.Columns.Add(column); 3070control.Columns.Add(column); 3089control.Columns.Add(column); 3119control.Columns.Add(column); 3174control.Columns.Add(column); 3197control.Columns.Add(column); 3221control.Columns.Add(column); 3259control.Columns.Add(column); 3324control.Columns.Add(column); 3341control.Columns.Add(column); 3448control.Columns.Add(column); 3463control.Columns.Add(column); 3480control.Columns.Add(column); 3497control.Columns.Add(column); 3516control.Columns.Add(column); 3532control.Columns.Add(column); 3569control.Columns.Add(column); 3583control.Columns.Add(column); 3604control.Columns.Add(column); 3643control.Columns.Add(column); 3681control.Columns.Add(column); 3754control.Columns.Add(column); 3771control.Columns.Add(column); 3803control.Columns.Add(column); 3887control.Columns.Add(column); 3955control.Columns.Add(column); 3994control.Columns.Add(column); 4036control.Columns.Add(column); 4077control.Columns.Add(column); 4184control.Columns.Add(column); 4210control.Columns.Add(column); 4227control.Columns.Add(column); 4267control.Columns.Add(column); 4295control.Columns.Add(column); 4335control.Columns.Add(column); 4363control.Columns.Add(column); 4395control.Columns.Add(column); 4425control.Columns.Add(column); 4482control.Columns.Add(column); 4508control.Columns.Add(column); 4566control.Columns.Add(column); 4593control.Columns.Add(column); 4610control.Columns.Add(column); 4659control.Columns.Add(column);
System\Windows\Forms\DataGridViewImageCellTests.cs (7)
122dataGridView.Columns.Add(new DataGridViewImageColumn()); 147dataGridView.Columns.Add(new DataGridViewImageColumn()); 161dataGridView.Columns.Add(new DataGridViewImageColumn()); 177dataGridView.Columns.Add(dataGridViewImageColumn); 193dataGridView.Columns.Add(dataGridViewImageColumn); 232dataGridView.Columns.Add(dataGridViewImageColumn); 260dataGridView.Columns.Add(new DataGridViewImageColumn());
System\Windows\Forms\DataGridViewImageColumnTests.cs (6)
46dataGridView.Columns.Add(_column); 74dataGridView.Columns.Add(_column); 141dataGridView.Columns.Add(_column); 175dataGridView.Columns.Add(_column); 209dataGridView.Columns.Add(_column); 278dataGridView.Columns.Add(_column);
System\Windows\Forms\DataGridViewLinkCellTests.cs (7)
20dataGridView.Columns.Add(new DataGridViewTextBoxColumn()); 334dataGridView.Columns.Clear(); 335dataGridView.Columns.Add(new DataGridViewLinkColumn()); 350dataGridView.Columns.Clear(); 351dataGridView.Columns.AddRange([new DataGridViewLinkColumn { Text = "ColumnText" }]); 379dataGridView.Columns.Clear(); 380dataGridView.Columns.AddRange([new DataGridViewLinkColumn { Text = "ColumnText" }]);
System\Windows\Forms\DataGridViewLinkColumnTests.cs (14)
51_dataGridView.Columns.Add(_column); 66_dataGridView.Columns.Add(_column); 105_dataGridView.Columns.Add(_column); 120_dataGridView.Columns.Add(_column); 143_dataGridView.Columns.Add(_column); 158_dataGridView.Columns.Add(_column); 181_dataGridView.Columns.Add(_column); 204_dataGridView.Columns.Add(_column); 219_dataGridView.Columns.Add(_column); 242_dataGridView.Columns.Add(_column); 257_dataGridView.Columns.Add(_column); 280_dataGridView.Columns.Add(_column); 295_dataGridView.Columns.Add(_column); 362dataGridView.Columns.Add(_column);
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (11)
90dataGridView.Columns.Add("name", "text"); 103dataGridView.Columns.Add("name", "text"); 114dataGridView.Columns.Add("name", "text"); 127dataGridView.Columns.Add("name", "text"); 138dataGridView.Columns.Add("name", "text"); 151dataGridView.Columns.Add("name", "text"); 162dataGridView.Columns.Add("name", "text"); 175dataGridView.Columns.Add("name", "text"); 186dataGridView.Columns.Add("name", "text"); 199dataGridView.Columns.Add("name", "text"); 212dataGridView.Columns.Add("name", "text");
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (11)
117dataGridView.Columns.Add("name", "text"); 130dataGridView.Columns.Add("name", "text"); 141dataGridView.Columns.Add("name", "text"); 154dataGridView.Columns.Add("name", "text"); 165dataGridView.Columns.Add("name", "text"); 178dataGridView.Columns.Add("name", "text"); 189dataGridView.Columns.Add("name", "text"); 202dataGridView.Columns.Add("name", "text"); 213dataGridView.Columns.Add("name", "text"); 226dataGridView.Columns.Add("name", "text"); 239dataGridView.Columns.Add("name", "text");
System\Windows\Forms\DataGridViewRowTests.cs (13)
1137control.Columns.Add(row); 1151control.Columns.Add(row); 1368control.Columns.Add(row); 2953control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 4135control.Columns.Add("Name", "Text"); 4136control.Columns[0].CellTemplate = null; 4640control.Columns[0].Frozen = true; 4641control.Columns[0].Visible = true; 5086control.Columns[0].Frozen = true; 5087control.Columns[0].Visible = true; 5319control.Columns[0].Frozen = true; 5406control.Columns[0].Frozen = true; 5407control.Columns[0].Visible = true;
System\Windows\Forms\DataGridViewSelectedColumnCollectionTests.cs (91)
31control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 32control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 33control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 36control.Columns[0].Selected = true; 37control.Columns[1].Selected = false; 38control.Columns[2].Selected = true; 55control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 56control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 57control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 60control.Columns[0].Selected = true; 61control.Columns[1].Selected = false; 62control.Columns[2].Selected = true; 65Assert.Equal(control.Columns[2], collection[0]); 66Assert.Equal(control.Columns[0], collection[1]); 90control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 91control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 92control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 95control.Columns[0].Selected = true; 96control.Columns[1].Selected = false; 97control.Columns[2].Selected = true; 119control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 120control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 121control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 124control.Columns[0].Selected = true; 125control.Columns[1].Selected = false; 126control.Columns[2].Selected = true; 129Assert.True(collection.Contains(control.Columns[0])); 130Assert.False(collection.Contains(control.Columns[1])); 131Assert.True(collection.Contains(control.Columns[2])); 169control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 170control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 171control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 174control.Columns[0].Selected = true; 175control.Columns[1].Selected = false; 176control.Columns[2].Selected = true; 181Assert.Equal([1, control.Columns[2], control.Columns[0]], array); 223control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 224control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 225control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 228control.Columns[0].Selected = true; 229control.Columns[1].Selected = false; 230control.Columns[2].Selected = true; 249control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 250control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 251control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 254control.Columns[0].Selected = true; 255control.Columns[1].Selected = false; 256control.Columns[2].Selected = true; 260Assert.Equal(control.Columns[2], iList[0]); 261Assert.Equal(control.Columns[0], iList[1]); 286control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 287control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 288control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 291control.Columns[0].Selected = true; 292control.Columns[1].Selected = false; 293control.Columns[2].Selected = true; 362control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 363control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 364control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 367control.Columns[0].Selected = true; 368control.Columns[1].Selected = false; 369control.Columns[2].Selected = true; 375Assert.Equal([1, control.Columns[2], control.Columns[0]], array); 403control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 404control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 405control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 408control.Columns[0].Selected = true; 409control.Columns[1].Selected = false; 410control.Columns[2].Selected = true; 414Assert.True(iList.Contains(control.Columns[0])); 415Assert.False(iList.Contains(control.Columns[1])); 416Assert.True(iList.Contains(control.Columns[2])); 448control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 449control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 450control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 453control.Columns[0].Selected = true; 454control.Columns[1].Selected = false; 455control.Columns[2].Selected = true; 465Assert.Same(control.Columns[2], enumerator.Current); 468Assert.Same(control.Columns[0], enumerator.Current); 503control.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 504control.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable; 505control.Columns[2].SortMode = DataGridViewColumnSortMode.NotSortable; 508control.Columns[0].Selected = true; 509control.Columns[1].Selected = false; 510control.Columns[2].Selected = true; 514Assert.Equal(1, iList.IndexOf(control.Columns[0])); 515Assert.Equal(-1, iList.IndexOf(control.Columns[1])); 516Assert.Equal(0, iList.IndexOf(control.Columns[2]));
System\Windows\Forms\DataGridViewSortCompareEventArgsTests.cs (1)
15_dataGridView.Columns.Add(_column);
System\Windows\Forms\DataGridViewTests.cs (60)
450control.Columns.Add(column); 692control.Columns.Add(column); 746control.Columns.Add(column); 1378control.Columns.Add(column); 1631control.Columns.Add(column); 1687control.Columns.Add(column); 2079control.Columns.Add(column); 2284control.Columns.Add(column); 2353dataGridView.Columns.AddRange(new[] { new DataGridViewTextBoxColumn(), new DataGridViewTextBoxColumn() }); 2552control.Columns.Add(column); 2765control.Columns.Add(column); 2813Assert.Equal(2, control.Columns.Count); 2820Assert.Empty(control.Columns); 2854Assert.Equal(2, control.Columns.Count); 2860Assert.Equal(2, control.Columns.Count); 2868Assert.Equal(2, control.Columns.Count); 3388_dataGridView.Columns.Add("Column1", "Column1"); 3412_dataGridView.Columns.Add("Column1", "Column1"); 3440_dataGridView.Columns.Add("Column1", "Column1"); 3466_dataGridView.Columns.Add("Column1", "Column1"); 3471_dataGridView.Sort(_dataGridView.Columns[0], ListSortDirection.Ascending); 3475_dataGridView.Sort(_dataGridView.Columns[0], ListSortDirection.Descending); 3606dataGridView.Columns.Add("TestColumn", "Test Column"); 3632_dataGridView.Columns.Add("Column1", "Column1"); 3660_dataGridView.Columns.Add("Column1", "Column1"); 3685dataGridView.Columns.Add("Column1", "Column1"); 3712dataGridView.Columns.Add("Column1", "Column1"); 3739dataGridView.Columns.Add("Column1", "Column1"); 3766dataGridView.Columns.Add("Column1", "Column1"); 3793dataGridView.Columns.Add("Column1", "Column1"); 3794dataGridView.Columns.Add("Column2", "Column2"); 3819dataGridView.Columns.Add("Column1", "Column1"); 3820dataGridView.Columns.Add("Column2", "Column2"); 3845dataGridView.Columns.Add("Column1", "Column1"); 3846dataGridView.Columns.Add("Column2", "Column2"); 3870_dataGridView.Columns.Add("Column1", "Column1"); 3871_dataGridView.Columns.Add("Column2", "Column2"); 3874_dataGridView.Columns[0].HeaderCell = new(); 3878_dataGridView.Columns[1].HeaderCell = new(); 3893_dataGridView.Columns.Add("Column1", "Column1"); 3896_dataGridView.Columns[0].MinimumWidth = 50; 3900_dataGridView.Columns[0].MinimumWidth = 100; 3915_dataGridView.Columns.Add("Column1", "Column1"); 3918_dataGridView.Columns[0].Name = "TestName1"; 3922_dataGridView.Columns[0].Name = "TestName2"; 3937_dataGridView.Columns.Add("Column1", "Column1"); 3938_dataGridView.Columns.Add("Column2", "Column2"); 3941_dataGridView.Columns.Remove("Column2"); 3945_dataGridView.Columns.Remove("Column1"); 3960_dataGridView.Columns.Add("Column1", "Column1"); 3963_dataGridView.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 3967_dataGridView.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic; 3982_dataGridView.Columns.Add("Column1", "Column1"); 3985_dataGridView.Columns[0].ToolTipText = "ToolTip Text"; 3989_dataGridView.Columns[0].ToolTipText = "New ToolTip Text"; 4004_dataGridView.Columns.Add("Column1", "Column1"); 4007_dataGridView.Columns[0].Width = 50; 4011_dataGridView.Columns[0].Width = 100; 4061_dataGridView.Columns.Add("Column1", "Column 1"); 4062_dataGridView.Columns.Add("Column2", "Column 2");
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
144dataGridView.Columns.AddRange(new[] { column1, column2, });
System\Windows\Forms\DataGridViewTextBoxColumnTests.cs (2)
15_dataGridView.Columns.Add(_column); 93dataGridView?.Columns.Add(column);
TestPassApp (1)
DataControls.Designer.cs (1)
267this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
WinFormsControlsTest (4)
DataGridViewInVirtualModeTest.cs (2)
66switch (dataGridView1.Columns[e.ColumnIndex].Name) 97switch (dataGridView1.Columns[e.ColumnIndex].Name)
DataGridViewInVirtualModeTest.Designer.cs (1)
48this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
DataGridViewTest.Designer.cs (1)
65this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {