841 references to Columns
System.Windows.Forms (837)
winforms\Managed\System\WinForms\DataGridView.cs (50)
1122
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
1138
DataGridViewAutoSizeColumnMode[] previousModes = new DataGridViewAutoSizeColumnMode[this.
Columns
.Count];
1139
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
1766
return this.
Columns
.Count;
1778
if (value != this.
Columns
.Count)
1783
this.
Columns
.Clear();
1785
else if (value < this.
Columns
.Count)
1788
while (value < this.
Columns
.Count)
1790
int currentColumnCount = this.
Columns
.Count;
1791
this.
Columns
.RemoveAt(currentColumnCount - 1);
1792
if (this.
Columns
.Count >= currentColumnCount)
1802
while (value > this.
Columns
.Count)
1804
int currentColumnCount = this.
Columns
.Count;
1805
this.
Columns
.Add(null /*columnName*/, null /*headerText*/);
1806
if (this.
Columns
.Count <= currentColumnCount)
2125
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
2132
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
2185
Debug.Assert(this.ptCurrentCell.X < this.
Columns
.Count);
2210
if (!this.
Columns
[value.ColumnIndex].Visible ||
2249
Debug.Assert(this.ptCurrentCell.X >= 0 && this.ptCurrentCell.X < this.
Columns
.Count);
2269
bool previousVisibleColumnExists = (null != this.
Columns
.GetPreviousColumn(this.
Columns
[this.ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None));
2287
bool nextVisibleColumnExists = (null != this.
Columns
.GetNextColumn(this.
Columns
[this.ptCurrentCell.X], DataGridViewElementStates.Visible, DataGridViewElementStates.None));
2930
firstDisplayedCell.ColumnIndex < this.
Columns
.Count);
2944
if (!this.
Columns
[firstDisplayedCell.ColumnIndex].Frozen)
2993
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
3094
if (value < 0 || value >= this.
Columns
.Count)
3098
if (!this.
Columns
[value].Visible)
3102
if (this.
Columns
[value].Frozen)
3118
int totalVisibleFrozenWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
3147
this.
Columns
.DisplayInOrder(this.displayedBandsInfo.FirstDisplayedScrollingCol, value));
3148
int maxHorizontalOffset = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible) - displayWidth;
3388
int widthNotVisible = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible) - this.layout.Data.Width;
3407
int totalVisibleFrozenWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
3445
!this.
Columns
[this.ptCurrentCell.X].Frozen &&
3458
else if (this.
Columns
.DisplayInOrder(oldFirstVisibleScrollingCol, this.displayedBandsInfo.FirstDisplayedScrollingCol))
3460
scrollEventType = this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingCol, this.displayedBandsInfo.FirstDisplayedScrollingCol) > 1 ? ScrollEventType.LargeIncrement : ScrollEventType.SmallIncrement;
3464
Debug.Assert(this.
Columns
.DisplayInOrder(this.displayedBandsInfo.FirstDisplayedScrollingCol, oldFirstVisibleScrollingCol));
3465
scrollEventType = this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible, this.displayedBandsInfo.FirstDisplayedScrollingCol, oldFirstVisibleScrollingCol) > 1 ? ScrollEventType.LargeDecrement : ScrollEventType.SmallDecrement;
3514
else if (value > 0 && (this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible) - this.layout.Data.Width) <= 0)
3947
for (int columnIndex = 0; columnIndex < this.
Columns
.Count; columnIndex++)
4088
if (this.
Columns
.Count == 0)
4092
this.
Columns
.Add(dataGridViewTextBoxColumn);
4580
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
4687
strc.Add(this.
Columns
[columnIndex]);
4752
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
5288
if (null == this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible))
6978
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
6991
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
winforms\Managed\System\WinForms\DataGridViewAccessibleObject.cs (9)
98
if (this.owner.
Columns
.Count == 0)
148
if (this.owner.
Columns
.Count == 0)
205
int actualDisplayIndex = this.owner.
Columns
.ColumnIndexToActualDisplayIndex(hti.ColumnIndex, DataGridViewElementStates.Visible);
302
for (int i = 0; i < owner.
Columns
.Count; i++)
304
if (owner.IsSortable(owner.
Columns
[i]))
375
UnsafeNativeMethods.IRawElementProviderSimple[] result = new UnsafeNativeMethods.IRawElementProviderSimple[this.owner.
Columns
.Count];
376
for (int i = 0; i < this.owner.
Columns
.Count; i++)
378
result[i] = this.owner.
Columns
[i].HeaderCell.AccessibilityObject;
396
column >= 0 && column < this.owner.
Columns
.Count)
winforms\Managed\System\WinForms\DataGridViewBand.cs (2)
991
this.DataGridView.
Columns
.InvalidateCachedColumnCount(elementState);
992
this.DataGridView.
Columns
.InvalidateCachedColumnsWidth(elementState);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (1)
534
this.ColumnIndex < this.DataGridView.
Columns
.Count &&
winforms\Managed\System\WinForms\DataGridViewCell.cs (11)
1214
DataGridViewColumn dataGridViewColumn = this.DataGridView.
Columns
.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None);
2025
Debug.Assert(this.ColumnIndex < this.DataGridView.
Columns
.Count);
2168
Debug.Assert(this.ColumnIndex < this.DataGridView.
Columns
.Count);
2678
Debug.Assert(this.ColumnIndex < dataGridView.
Columns
.Count);
3466
if (this.DataGridView != null && e.ColumnIndex < this.DataGridView.
Columns
.Count && e.RowIndex < this.DataGridView.Rows.Count)
5097
int firstVisibleColumnIndex = this.owner.DataGridView.
Columns
.ColumnIndexToActualDisplayIndex(this.owner.DataGridView.FirstDisplayedScrollingColumnIndex, DataGridViewElementStates.Visible);
5098
int visibleColumnIndex = this.owner.DataGridView.
Columns
.ColumnIndexToActualDisplayIndex(this.owner.ColumnIndex, DataGridViewElementStates.Visible);
5305
if (this.owner.OwningColumn == this.owner.DataGridView.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible))
5335
int previousVisibleColumnIndex = this.owner.DataGridView.
Columns
.GetPreviousColumn(this.owner.OwningColumn,
5344
if (this.owner.OwningColumn == this.owner.DataGridView.
Columns
.GetLastColumn(DataGridViewElementStates.Visible,
5377
int nextVisibleColumnIndex = this.owner.DataGridView.
Columns
.GetNextColumn(this.owner.OwningColumn,
winforms\Managed\System\WinForms\DataGridViewCellCollection.cs (7)
194
dataGridViewCell.OwningColumnInternal = this.owner.DataGridView.
Columns
[index];
223
dataGridViewColumn = this.owner.DataGridView.
Columns
[columnName];
236
dataGridViewColumn = this.owner.DataGridView.
Columns
[columnName];
286
if (dataGridView != null && dataGridView.
Columns
.Count > index)
288
dataGridViewCell.OwningColumnInternal = dataGridView.
Columns
[index];
408
if (dataGridView != null && dataGridView.
Columns
.Count > index)
410
dataGridViewCell.OwningColumnInternal = dataGridView.
Columns
[index];
winforms\Managed\System\WinForms\DataGridViewCellPaintingEventArgs.cs (3)
196
if (this.columnIndex < -1 || this.columnIndex >= this.dataGridView.
Columns
.Count)
220
if (this.columnIndex < -1 || this.columnIndex >= this.dataGridView.
Columns
.Count)
249
if (this.columnIndex < -1 || this.columnIndex >= this.dataGridView.
Columns
.Count)
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (3)
965
this.ColumnIndex < this.DataGridView.
Columns
.Count &&
1084
Debug.Assert((position.X >= 0) && (position.X < this.DataGridView.
Columns
.Count));
1088
int visibleColumnIndex = this.DataGridView.
Columns
.ColumnIndexToActualDisplayIndex(position.X, DataGridViewElementStates.Visible);
winforms\Managed\System\WinForms\DataGridViewColumn.cs (1)
378
if (value >= this.DataGridView.
Columns
.Count)
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (6)
1462
if (this.Owner.OwningColumn == this.Owner.DataGridView.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible))
1476
int previousVisibleColumnIndex = this.Owner.DataGridView.
Columns
.GetPreviousColumn(this.Owner.OwningColumn,
1479
int actualDisplayIndex = this.Owner.DataGridView.
Columns
.ColumnIndexToActualDisplayIndex(previousVisibleColumnIndex,
1494
if (this.Owner.OwningColumn == this.Owner.DataGridView.
Columns
.GetLastColumn(DataGridViewElementStates.Visible,
1501
int nextVisibleColumnIndex = this.Owner.DataGridView.
Columns
.GetNextColumn(this.Owner.OwningColumn,
1504
int actualDisplayIndex = this.Owner.DataGridView.
Columns
.ColumnIndexToActualDisplayIndex(nextVisibleColumnIndex,
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (13)
319
for (int i = 0; i < this.owner.
Columns
.Count; i++)
321
if (this.owner.
Columns
[i].IsDataBound)
323
this.owner.
Columns
[i].HeaderCell.SortGlyphDirection = SortOrder.None;
335
for (int i = 0; i < this.owner.
Columns
.Count; i++)
337
DataGridViewColumn column = this.owner.
Columns
[i];
535
if (this.owner.
Columns
.Count > 0)
717
for (int columnIndex = 0; columnIndex < this.owner.
Columns
.Count; columnIndex++)
719
DataGridViewColumn dataGridViewColumn = this.owner.
Columns
[columnIndex];
763
if (this.owner.
Columns
.Count == 0)
1303
if (this.owner.
Columns
.Count == 0)
1325
DataGridViewColumn dataGridViewColumn = this.owner.
Columns
.GetFirstColumn(DataGridViewElementStates.None);
1370
(columnIndex < this.owner.
Columns
.Count && rowIndex < this.owner.Rows.Count &&
1578
Type columnType = this.owner.
Columns
[columnIndex].ValueType;
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (1)
838
this.ColumnIndex < this.DataGridView.
Columns
.Count &&
winforms\Managed\System\WinForms\DataGridViewMethods.cs (676)
38
if (cellAddress.X < 0 || cellAddress.X >= this.
Columns
.Count)
49
int visibleColumnIndex = this.
Columns
.ColumnIndexToActualDisplayIndex(cellAddress.X, DataGridViewElementStates.Visible);
82
Debug.Assert(this.
Columns
.Count > 0);
359
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
368
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
377
Debug.Assert(columnIndex >= -1 && columnIndex < this.
Columns
.Count);
392
width = this.
Columns
[columnIndex].Thickness;
470
width = this.
Columns
[columnIndex].Thickness;
555
if (this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible) > this.layout.Data.Width)
567
dataGridViewColumn == this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen) ||
568
dataGridViewColumn == this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen))
578
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
618
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
647
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
668
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
686
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
718
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
727
if (this.
Columns
.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index))
767
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
772
this.
Columns
.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index))
781
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
805
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
811
this.
Columns
.DisplayInOrder(dataGridViewColumnTmp.Index, dataGridViewColumn.Index))
834
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
836
if (this.
Columns
.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index) &&
852
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
906
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
918
autoFillColumns = new ArrayList(this.
Columns
.Count);
1370
if (this.
Columns
.Count == 0 && this.Rows.Count == 0)
1376
this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible) == null))
1387
allCellsSelected = this.individualSelectedCells.Count == this.
Columns
.Count * this.Rows.Count;
1400
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
1407
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
1418
allCellsSelected = this.selectedBandIndexes.Count * this.Rows.Count + this.individualSelectedCells.Count == this.
Columns
.Count * this.Rows.Count;
1425
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
1441
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
1451
allCellsSelected = this.selectedBandIndexes.Count * this.
Columns
.Count + this.individualSelectedCells.Count == this.
Columns
.Count * this.Rows.Count;
1467
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
1474
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
1502
DataGridViewColumnCollection dataGridViewCols = this.
Columns
;
1641
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
1650
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
1694
if (columnIndex < 0 || columnIndex >= this.
Columns
.Count)
1752
int columnsCount = this.
Columns
.Count;
1755
if (this.
Columns
[columnIndex].Visible)
1759
preferredHeight = Math.Max(preferredHeight, this.
Columns
[columnIndex].HeaderCell.GetPreferredHeight(-1, this.
Columns
[columnIndex].Thickness));
1763
preferredHeight = Math.Max(preferredHeight, this.
Columns
[columnIndex].HeaderCell.GetPreferredSize(-1).Height);
1790
if (columnIndex < -1 || columnIndex >= this.
Columns
.Count)
1825
int columnsCount = this.
Columns
.Count;
1828
if (this.
Columns
[columnIndexTmp].Visible)
1832
preferredHeight = Math.Max(preferredHeight, this.
Columns
[columnIndexTmp].HeaderCell.GetPreferredHeight(-1, this.
Columns
[columnIndexTmp].Thickness));
1836
preferredHeight = Math.Max(preferredHeight, this.
Columns
[columnIndexTmp].HeaderCell.GetPreferredSize(-1).Height);
1867
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
1885
DataGridViewColumn dataGridViewColumn = this.
Columns
[columnIndex];
1903
this.
Columns
[columnIndex].ThicknessInternal = preferredColumnWidth;
1931
for (int columnIndex = 0; columnIndex < this.
Columns
.Count; columnIndex++)
2485
int frozenWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
2486
int scrollingWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible) - frozenWidth;
2487
if (this.
Columns
[index].Frozen)
2556
x += this.RightToLeftInternal ? -this.
Columns
[columnIndex].Width : this.
Columns
[columnIndex].Width;
2568
clip.Width = leftEdge - this.
Columns
[columnIndex].MinimumThickness - this.layout.Data.X + 3;
2578
clip.X = leftEdge + this.
Columns
[columnIndex].MinimumThickness - this.mouseBarOffset - 1;
2615
Debug.Assert(this.ptCurrentCell.X >= 0 && this.ptCurrentCell.X < this.
Columns
.Count);
3022
r = new Rectangle(mouseX + this.mouseBarOffset - this.
Columns
[this.trackColumn].Thickness + 1,
3024
this.
Columns
[this.trackColumn].Thickness,
3031
r = new Rectangle(mouseX + this.mouseBarOffset - 1, inside.Y, this.
Columns
[this.trackColumn].Thickness, inside.Height);
3169
if (this.
Columns
.Count > oldCurrentCellX && this.
Columns
[oldCurrentCellX].Visible)
3252
if (!IsColumnOutOfBounds(oldCurrentCellX) && this.
Columns
[oldCurrentCellX].Visible)
3507
if (columnIndexException < 0 || columnIndexException >= this.
Columns
.Count)
3517
if (columnIndexException < -1 || columnIndexException >= this.
Columns
.Count)
3638
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count, "Invalid columnIndex: " + columnIndex );
3639
if (this.
Columns
[columnIndex].IsDataBound &&
3659
DataGridViewColumn firstVisibleFrozenColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
3665
Debug.Assert(this.
Columns
.DisplayInOrder(firstVisibleFrozenColumn.Index, dataGridViewColumn.Index));
3666
return this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, firstVisibleFrozenColumn.Index, dataGridViewColumn.Index) < this.displayedBandsInfo.NumDisplayedFrozenCols;
3677
if (this.
Columns
.DisplayInOrder(firstDisplayedScrollingColumnIndex, dataGridViewColumn.Index))
3679
return this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible, firstDisplayedScrollingColumnIndex, dataGridViewColumn.Index) < this.displayedBandsInfo.NumDisplayedScrollingCols;
3701
int wColumn = this.
Columns
[hti.col].Width;
3711
DataGridViewColumn dataGridViewColumnPrev = this.
Columns
.GetPreviousColumn(this.
Columns
[hti.col],
3728
dataGridViewColumnNext = this.
Columns
.GetNextColumn(this.
Columns
[previousColumnIndex],
4130
Debug.Assert(columnIndex < this.
Columns
.Count);
4164
if (this.
Columns
.Count > cellsInCollection)
4167
DataGridViewCell[] cells = new DataGridViewCell[this.
Columns
.Count - cellsInCollection];
4168
for (int columnIndex = cellsInCollection; columnIndex < this.
Columns
.Count; columnIndex++)
4170
if (this.
Columns
[columnIndex].CellTemplate == null)
4174
DataGridViewCell dgvcNew = (DataGridViewCell) this.
Columns
[columnIndex].CellTemplate.Clone();
4188
if (this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) >= this.layout.Data.Width)
4195
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
4211
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
4219
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
4564
if (displayWidth <= 0 || this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0)
4575
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.None);
4596
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.None, DataGridViewElementStates.None);
4599
Debug.Assert(cx <= this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen));
4603
dataGridViewColumn = this.
Columns
[firstDisplayedScrollingCol];
4606
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible,
4629
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
4661
dataGridViewColumn = this.
Columns
.GetPreviousColumn((this.
Columns
[firstDisplayedScrollingCol]),
4671
dataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn,
4680
dataGridViewColumn = this.
Columns
.GetPreviousColumn((this.
Columns
[firstDisplayedScrollingCol]),
4720
dataGridViewColumn = this.
Columns
[firstDisplayedScrollingCol];
4723
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
4908
columnX -= this.
Columns
[columnIndex].Width;
4950
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
4978
Debug.Assert(dataGridViewColumn.DisplayIndex < this.
Columns
.Count);
4985
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
5010
Debug.Assert(anticipatedColumnIndex >= 0 && anticipatedColumnIndex <= this.
Columns
.Count);
5013
if (dataGridViewColumn.DisplayIndex == -1 || dataGridViewColumn.DisplayIndex > this.
Columns
.Count)
5019
Debug.Assert(dataGridViewColumn.DisplayIndex >= 0 && dataGridViewColumn.DisplayIndex <= this.
Columns
.Count);
5027
dataGridViewColumnPrev = this.
Columns
.GetColumnAtDisplayIndex(displayIndex);
5041
dataGridViewColumnNext = this.
Columns
.GetColumnAtDisplayIndex(displayIndex);
5044
while (displayIndex < this.
Columns
.Count && (dataGridViewColumnNext == null || !dataGridViewColumnNext.Visible));
5056
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
5061
dataGridViewTmp.
Columns
.Add(dataGridViewColumnClone);
5067
dataGridViewTmp.
Columns
.Add(dataGridViewColumnClone);
5079
dataGridViewColumnTmp = this.
Columns
.GetPreviousColumn(dataGridViewColumn,
5084
DataGridViewColumn dataGridViewColumnFirst = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
5090
while (dataGridViewColumnTmp != null && this.
Columns
.DisplayInOrder(dataGridViewColumnTmp.Index, dataGridViewColumn.Index))
5093
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp,
5101
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumn,
5109
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnLast,
5123
while (dataGridViewColumnTmp != null && this.
Columns
.DisplayInOrder(dataGridViewColumn.Index, dataGridViewColumnTmp.Index))
5126
dataGridViewColumnTmp = this.
Columns
.GetPreviousColumn(dataGridViewColumnTmp,
5151
int colCount = this.
Columns
.Count, displayIndex;
5162
dataGridViewColumnNext = this.
Columns
.GetColumnAtDisplayIndex(displayIndex);
5181
dataGridViewColumnPrev = this.
Columns
.GetColumnAtDisplayIndex(displayIndex);
5196
for (int columnIndex = dataGridViewColumn.Index; columnIndex < this.
Columns
.Count; columnIndex++)
5198
this.
Columns
[columnIndex].IndexInternal = this.
Columns
[columnIndex].Index - 1;
5199
Debug.Assert(this.
Columns
[columnIndex].Index == columnIndex);
5207
for (int columnIndex = dataGridViewColumn.Index + insertionCount; columnIndex < this.
Columns
.Count; columnIndex++)
5209
this.
Columns
[columnIndex].IndexInternal = columnIndex;
5513
int frozenVisibleColumnsWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
5533
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
5541
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
5554
dataGridViewColumn = (DataGridViewColumn)this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
5564
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
5590
for (int i = 0; i < this.
Columns
.Count; i ++)
5592
this.
Columns
[i].Dispose();
5595
this.
Columns
.Clear();
5693
rectInsertionBar.X = GetColumnXFromIndex(this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible).Index);
5702
if (this.
Columns
.GetNextColumn(this.
Columns
[this.trackColumnEdge], DataGridViewElementStates.Visible, DataGridViewElementStates.None) == null)
5723
GetColumnXFromIndex(this.trackColumnEdge) - this.
Columns
[this.trackColumnEdge].Width - offsetFromCenter);
5727
rectInsertionBar.X = Math.Min(GetColumnXFromIndex(this.trackColumnEdge) + this.
Columns
[this.trackColumnEdge].Width - offsetFromCenter,
5824
mouseX += ((hti.col == -1) ? this.RowHeadersWidth : this.
Columns
[hti.col].Thickness);
5856
if (dgvcme.ColumnIndex < this.
Columns
.Count &&
5867
dgvcme.ColumnIndex < this.
Columns
.Count &&
5880
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
5919
dgvcme.ColumnIndex < this.
Columns
.Count &&
5928
dgvcme.ColumnIndex < this.
Columns
.Count &&
5936
if (dgvcme.ColumnIndex < this.
Columns
.Count &&
5944
if (dgvcme.ColumnIndex < this.
Columns
.Count &&
5952
if (dgvcme.ColumnIndex < this.
Columns
.Count &&
6115
this.
Columns
[this.trackColumn].DisplayIndex = 0;
6117
else if (this.
Columns
[this.trackColumn].DisplayIndex > this.
Columns
[previousColumnIndex].DisplayIndex)
6119
this.
Columns
[this.trackColumn].DisplayIndex = this.
Columns
[previousColumnIndex].DisplayIndex + 1;
6123
this.
Columns
[this.trackColumn].DisplayIndex = this.
Columns
[previousColumnIndex].DisplayIndex;
6151
delta = GetColumnXFromIndex(this.trackColumn) - this.
Columns
[this.trackColumn].Thickness - newX + 1;
6156
delta = newX - (GetColumnXFromIndex(this.trackColumn) + this.
Columns
[this.trackColumn].Thickness) + 1;
6161
int proposed = this.
Columns
[this.trackColumn].Thickness + delta;
6162
Debug.Assert(proposed >= this.
Columns
[this.trackColumn].MinimumThickness);
6164
this.
Columns
[this.trackColumn].Thickness = proposed;
6440
if (!this.RowHeadersVisible && this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0)
6657
dataGridViewColumnTmp = this.
Columns
[columnIndexTmp];
6665
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
6673
dataGridViewColumnTmp = this.
Columns
.GetPreviousColumn(this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol], DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
6677
dataGridViewColumnTmp = this.
Columns
.GetPreviousColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
6686
dataGridViewColumnTmp = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
6691
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
6696
dataGridViewColumnTmp = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
6704
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DataGridViewElementStates.None);
6712
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DataGridViewElementStates.None);
6719
columnIndexTmp < this.
Columns
.Count &&
6722
this.
Columns
.DisplayInOrder(columnIndexTmp, this.displayedBandsInfo.FirstDisplayedScrollingCol) &&
6723
!ColumnNeedsDisplayedState(this.
Columns
[columnIndexTmp]))
6725
dataGridViewColumnTmp = this.
Columns
[columnIndexTmp];
6733
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
6740
columnIndexTmp < this.
Columns
.Count &&
6741
(this.displayedBandsInfo.FirstDisplayedScrollingCol == -1 || (this.displayedBandsInfo.FirstDisplayedScrollingCol != columnIndexTmp && this.
Columns
.DisplayInOrder(this.displayedBandsInfo.FirstDisplayedScrollingCol, columnIndexTmp))) &&
6742
!ColumnNeedsDisplayedState(this.
Columns
[columnIndexTmp]))
6744
dataGridViewColumnTmp = this.
Columns
[columnIndexTmp];
6754
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
6761
dataGridViewColumnTmp = this.
Columns
[this.
Columns
.Count - 1];
6768
dataGridViewColumnTmp = this.
Columns
.GetPreviousColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
6791
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
6942
return cellCount + this.selectedBandIndexes.Count * this.
Columns
.Count;
7007
return this.Rows.Count * this.
Columns
.Count;
7101
if (columnIndex >= this.
Columns
.Count)
7181
Debug.Assert(columnIndex >= -1 && columnIndex < this.
Columns
.Count);
7200
return this.
Columns
[columnIndex].HeaderCell;
7277
dataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7280
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7294
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7310
this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0 /*firstCell*/,
7327
this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0 /*lastCell*/,
7337
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
7340
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7354
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7378
dataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7383
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7397
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7415
this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0 /*firstCell*/,
7428
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
7448
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7462
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7497
if (this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) == 0)
7505
includeRowHeaders = (this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Selected) == null);
7541
DataGridViewColumn lastDataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7546
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7560
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7589
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected);
7608
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7622
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7649
DataGridViewColumn lastDataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7655
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7669
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7700
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected);
7720
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7734
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible | DataGridViewElementStates.Selected, DataGridViewElementStates.None);
7777
selectedVisibleCellExists = selectedVisibleRowExists && this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) != 0;
7781
selectedVisibleColumnExists = this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible | DataGridViewElementStates.Selected) != 0;
7905
DataGridViewColumn firstVisibleColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
7906
DataGridViewColumn lastVisibleColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.None);
7935
if (this.
Columns
[columnIndex].Visible)
7937
if (lColumn == null || this.
Columns
.DisplayInOrder(columnIndex, lColumn.Index))
7939
lColumn = this.
Columns
[columnIndex];
7941
if (uColumn == null || this.
Columns
.DisplayInOrder(uColumn.Index, columnIndex))
7943
uColumn = this.
Columns
[columnIndex];
7964
if (lColumn == null || this.
Columns
.DisplayInOrder(dataGridViewCell.ColumnIndex, lColumn.Index))
7968
if (uColumn == null || this.
Columns
.DisplayInOrder(uColumn.Index, dataGridViewCell.ColumnIndex))
7979
Debug.Assert(lColumn.Index == uColumn.Index || this.
Columns
.DisplayInOrder(lColumn.Index, uColumn.Index));
8012
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
8067
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
8114
prevDataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
8174
nextDataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
8246
if (columnIndex < 0 || columnIndex >= this.
Columns
.Count)
8255
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
8257
if (!this.
Columns
[columnIndex].Displayed)
8274
for (dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
8297
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8305
for (dataGridViewColumn = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
8339
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8420
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
8442
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8459
dataGridViewColumn = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
8482
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8525
Debug.Assert(index < this.
Columns
.Count);
8526
Debug.Assert(this.
Columns
[index].Visible);
8538
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
8553
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8571
dataGridViewColumn = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
8575
dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
8593
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8600
dataGridViewColumn = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
8601
dataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn,
8618
dataGridViewColumn = this.
Columns
.GetPreviousColumn(dataGridViewColumn,
8629
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen);
8633
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
8646
int emptyBackgroundWidth = Math.Max(0, this.layout.Data.Width - this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible));
8689
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
8770
this.
Columns
[this.ptAnchorCell.X].Frozen &&
8772
this.
Columns
[this.trackColumnEdge].Frozen &&
8774
!this.
Columns
[hti.col].Frozen)
8778
int firstUnfrozenColumnIndex = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen).Index;
8805
(!this.
Columns
[this.ptAnchorCell.X].Frozen ||
8806
(this.trackColumnEdge != -1 && !this.
Columns
[this.trackColumnEdge].Frozen)) &&
8809
this.
Columns
.GetPreviousColumn(this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol], DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen) != null))
8835
this.
Columns
.GetNextColumn(this.
Columns
[this.displayedBandsInfo.LastTotallyDisplayedScrollingCol], DataGridViewElementStates.Visible, DataGridViewElementStates.None) == null)
8841
DataGridViewColumn newFirstVisibleScrollingCol = this.
Columns
.GetNextColumn(this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol],
8845
for (DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible,
8848
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
8948
(this.ptAnchorCell.X != -1 && !this.
Columns
[this.ptAnchorCell.X].Frozen)
8950
(this.ptCurrentCell.X != -1 && !this.
Columns
[this.ptCurrentCell.X].Frozen)
8955
this.
Columns
.GetPreviousColumn(this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol], DataGridViewElementStates.Visible, DataGridViewElementStates.Frozen) != null)
8991
this.
Columns
.GetNextColumn(this.
Columns
[this.displayedBandsInfo.LastTotallyDisplayedScrollingCol], DataGridViewElementStates.Visible, DataGridViewElementStates.None) != null))
8993
DataGridViewColumn newFirstVisibleScrollingCol = this.
Columns
.GetNextColumn(this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol],
8997
for (DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible,
9000
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
9080
int preferredWidth = Math.Min(minimumWidth + this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible), proposedConstraints.Width);
9454
int columnWidth = this.
Columns
[hti.col].Thickness;
9467
DataGridViewColumn dataGridViewColumn = this.
Columns
[hti.col];
9486
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[hti.col],
9636
int columnWidth = this.
Columns
[hti.col].Thickness;
9648
DataGridViewColumn dataGridViewColumn = this.
Columns
[hti.col];
9662
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[hti.col],
9705
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
9955
if (columnIndex < -1 || columnIndex >= this.
Columns
.Count)
9984
if (columnIndex < 0 || columnIndex >= this.
Columns
.Count)
9993
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
10213
return columnIndex >= this.
Columns
.Count || columnIndex == -1;
10218
return columnIndex >= this.
Columns
.Count || rowIndex >= this.Rows.Count || columnIndex == -1 || rowIndex == -1;
10336
int totalVisibleColCount = this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible);
10338
int totalVisibleWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible);
10339
int totalVisibleFrozenWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
10693
Debug.Assert(this.ptCurrentCell.X >= 0 && this.ptCurrentCell.X < this.
Columns
.Count);
10712
Debug.Assert(dataGridViewColumn.Index < this.
Columns
.Count);
10715
if (dataGridViewColumn.DisplayIndex == -1 || dataGridViewColumn.DisplayIndex >= this.
Columns
.Count)
10720
this.
Columns
.InvalidateCachedColumnsOrder();
10932
float weightSum = this.
Columns
.GetColumnsFillWeight(DataGridViewElementStates.None) + dataGridViewColumn.FillWeight;
10939
CorrectColumnFrozenState(dataGridViewColumn, this.
Columns
.Count);
10956
int newColumnCount = this.
Columns
.Count + 1;
11003
float weightSum = this.
Columns
.GetColumnsFillWeight(DataGridViewElementStates.None);
11093
int previousColumnCount = this.
Columns
.Count;
11161
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
11195
if (dataGridViewRow.Cells.Count > this.
Columns
.Count)
11426
if (previousModes.Length != this.
Columns
.Count)
11431
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
11483
foreach (DataGridViewColumn dataGridViewColumn in this.
Columns
)
11724
if (e.ColumnIndex >= this.
Columns
.Count)
11761
if (e.ColumnIndex >= this.
Columns
.Count)
11813
DataGridViewAutoSizeColumnCriteriaInternal autoSizeColumnCriteriaInternal = (DataGridViewAutoSizeColumnCriteriaInternal)this.
Columns
[columnIndex].InheritedAutoSizeMode;
11847
if (e.ColumnIndex >= this.
Columns
.Count)
11883
if (e.ColumnIndex >= this.
Columns
.Count)
11920
if (e.ColumnIndex >= this.
Columns
.Count)
11946
if (e.ColumnIndex >= this.
Columns
.Count)
11965
if (e.ColumnIndex >= this.
Columns
.Count)
11996
if (e.ColumnIndex >= this.
Columns
.Count)
12022
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
12032
if (e.ColumnIndex >= this.
Columns
.Count)
12069
if (e.ColumnIndex >= this.
Columns
.Count)
12099
if (e.ColumnIndex >= this.
Columns
.Count)
12129
if (e.ColumnIndex >= this.
Columns
.Count)
12155
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
12165
if (e.ColumnIndex >= this.
Columns
.Count)
12194
if (e.ColumnIndex >= this.
Columns
.Count)
12226
if (e.ColumnIndex >= this.
Columns
.Count)
12258
if (e.ColumnIndex >= this.
Columns
.Count)
12337
Debug.Assert(this.
Columns
[columnIndex].Resizable == DataGridViewTriState.True);
12459
if (hti.col >= this.
Columns
.Count)
12461
DataGridViewColumn dataGridViewLastVisibleColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible,
12551
if (isControlDown && this.
Columns
[hti.col].Selected)
12563
this.
Columns
[this.ptAnchorCell.X].Selected)
12606
if (this.
Columns
.DisplayInOrder(this.ptAnchorCell.X, hti.col))
12633
(this.
Columns
[hti.col].Selected || IsSharedCellSelected(this.Rows.SharedRow(hti.row).Cells[hti.col], hti.row)) &&
12920
if (e.ColumnIndex >= this.
Columns
.Count)
12954
if (e.ColumnIndex >= this.
Columns
.Count)
12988
if (e.ColumnIndex >= this.
Columns
.Count)
13022
this.ptMouseDownCell.X < this.
Columns
.Count)
13056
if (e.ColumnIndex >= this.
Columns
.Count)
13087
if (e.ColumnIndex >= this.
Columns
.Count)
13116
if (e.ColumnIndex >= this.
Columns
.Count)
13214
if (e.ColumnIndex >= this.
Columns
.Count)
13400
if (e.ColumnIndex >= this.
Columns
.Count)
13426
if (e.ColumnIndex >= this.
Columns
.Count)
13452
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
13462
if (e.ColumnIndex >= this.
Columns
.Count)
13504
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
13515
if (e.ColumnIndex >= this.
Columns
.Count)
13553
if (e.ColumnIndex >= this.
Columns
.Count)
13582
if (e.ColumnIndex < 0 || e.ColumnIndex >= this.
Columns
.Count)
13613
if (e.ColumnIndex < 0 || e.ColumnIndex >= this.
Columns
.Count)
13723
for (int i = 0; i < this.
Columns
.Count; i++)
13725
if (this.
Columns
[i].DataPropertyName.Length != 0)
13727
MapDataGridViewColumnToDataBoundField(this.
Columns
[i]);
13738
if (this.
Columns
.Count != 0 && this.Rows.Count == 0)
13856
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
13869
foreach (DataGridViewColumn dataGridViewColumnTmp in this.
Columns
)
13911
this.
Columns
.InvalidateCachedColumnsOrder();
13936
if (!e.Handled && e.Button == MouseButtons.Left && e.ColumnIndex < this.
Columns
.Count)
13946
DataGridViewAutoSizeColumnMode inheritedAutoSizeMode = this.
Columns
[e.ColumnIndex].InheritedAutoSizeMode;
13994
float weightSum = this.
Columns
.GetColumnsFillWeight(DataGridViewElementStates.None) - dataGridViewColumn.FillWeight + fillWeight;
14003
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
14005
if (!this.
Columns
[columnIndex].Visible)
14019
DataGridViewAutoSizeColumnCriteriaInternal autoSizeColumnCriteriaInternal = (DataGridViewAutoSizeColumnCriteriaInternal)this.
Columns
[columnIndex].InheritedAutoSizeMode;
14075
DataGridViewAutoSizeColumnCriteriaInternal autoSizeColumnCriteriaInternal = (DataGridViewAutoSizeColumnCriteriaInternal)this.
Columns
[columnIndex].InheritedAutoSizeMode;
14111
DataGridViewColumn dataGridViewColumn = this.
Columns
[e.ColumnIndex];
14171
if (isControlDown && this.
Columns
[hti.col].Selected)
14237
this.
Columns
[this.ptAnchorCell.X].Selected)
14288
if (this.
Columns
.DisplayInOrder(this.ptAnchorCell.X, hti.col))
14614
if (this.trackColumnEdge >= 0 && (this.
Columns
.DisplayInOrder(this.trackColumn, this.trackColumnEdge) || this.trackColumnEdge == this.trackColumn) && this.
Columns
.DisplayInOrder(this.trackColumnEdge, hti.col))
14616
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[this.trackColumnEdge], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14621
else if (this.trackColumnEdge >= 0 && this.
Columns
.DisplayInOrder(this.trackColumn, this.trackColumnEdge) && this.
Columns
.DisplayInOrder(hti.col, this.trackColumnEdge) && (this.
Columns
.DisplayInOrder(this.trackColumn, hti.col) || hti.col == this.trackColumn))
14623
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[hti.col], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14628
else if (this.trackColumnEdge == -1 && this.
Columns
.DisplayInOrder(this.trackColumn, hti.col))
14630
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[this.trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14635
else if (this.trackColumnEdge >= 0 && (this.
Columns
.DisplayInOrder(this.trackColumnEdge, this.trackColumn) || this.trackColumnEdge == this.trackColumn) && this.
Columns
.DisplayInOrder(hti.col, this.trackColumnEdge))
14637
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[this.trackColumnEdge], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14642
else if (this.trackColumnEdge >= 0 && this.
Columns
.DisplayInOrder(this.trackColumnEdge, this.trackColumn) && this.
Columns
.DisplayInOrder(this.trackColumnEdge, hti.col) && (this.
Columns
.DisplayInOrder(hti.col, this.trackColumn) || hti.col == this.trackColumn))
14644
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[hti.col], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14649
else if (this.trackColumnEdge == -1 && this.
Columns
.DisplayInOrder(hti.col, this.trackColumn))
14651
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[this.trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14656
else if (this.trackColumnEdge >= 0 && this.
Columns
.DisplayInOrder(this.trackColumn, this.trackColumnEdge) && this.
Columns
.DisplayInOrder(hti.col, this.trackColumn))
14658
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[this.trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14661
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[this.trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14666
else if (this.trackColumnEdge >= 0 && this.
Columns
.DisplayInOrder(this.trackColumn, hti.col) && this.
Columns
.DisplayInOrder(this.trackColumnEdge, this.trackColumn))
14668
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[this.trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14671
dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[this.trackColumn], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
14806
Debug.Assert(this.
Columns
.DisplayInOrder(dataGridViewColumn.Index, this.displayedBandsInfo.FirstDisplayedScrollingCol));
14943
this.
Columns
.InvalidateCachedColumnsWidths();
15330
Debug.Assert(!this.
Columns
[dataGridViewCell.ColumnIndex].ReadOnly);
15779
this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 1 /*forceCurrentCellSelection*/);
15920
int newColumnCount = this.
Columns
.Count + 1;
16342
mouseX += ((hti.col == -1) ? this.RowHeadersWidth : this.
Columns
[hti.col].Thickness);
16352
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
16373
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
16383
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
16422
mouseX += ((hti.col == -1) ? this.RowHeadersWidth : this.
Columns
[hti.col].Thickness);
16438
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
16449
if (columnIndex < this.
Columns
.Count)
16453
Debug.Assert(this.
Columns
[columnIndex].Resizable == DataGridViewTriState.True);
16474
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
16546
mouseX += ((hti.col == -1) ? this.RowHeadersWidth : this.
Columns
[hti.col].Thickness);
16585
if (this.ptMouseEnteredCell.X >= -1 && this.ptMouseEnteredCell.X < this.
Columns
.Count &&
16802
mouseX += ((hti.col == -1) ? this.RowHeadersWidth : this.
Columns
[hti.col].Thickness);
16825
if (dgvcme.ColumnIndex < this.
Columns
.Count && dgvcme.RowIndex < this.Rows.Count)
16876
mouseX += ((hti.col == -1) ? this.RowHeadersWidth : this.
Columns
[hti.col].Thickness);
17475
Debug.Assert(dataGridViewColumn.Index >= 0 && dataGridViewColumn.Index < this.
Columns
.Count);
17486
DataGridViewColumn dataGridViewColumnNext = this.
Columns
.GetNextColumn(
17487
this.
Columns
[columnIndex],
17503
DataGridViewColumn dataGridViewColumnPrevious = this.
Columns
.GetPreviousColumn(
17504
this.
Columns
[columnIndex],
17555
if (this.
Columns
.Count == 1)
17562
int newColumnCount = this.
Columns
.Count - 1;
17590
for (int i = 0; i < this.
Columns
.Count; i ++)
17592
if (dataGridViewColumn != this.
Columns
[i] &&
17593
this.
Columns
[i].SortMode != DataGridViewColumnSortMode.NotSortable &&
17595
this.
Columns
[i].DataPropertyName,
17599
Debug.Assert(this.
Columns
[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
17600
Debug.Assert(this.
Columns
[i].HeaderCell.SortGlyphDirection == dataGridViewColumn.HeaderCell.SortGlyphDirection, "DataBound columns should have the same SortGlyphDirection as the one on the DataGridView");
17601
this.sortedColumn = this.
Columns
[i];
17602
this.sortOrder = this.
Columns
[i].HeaderCell.SortGlyphDirection;
17621
else if (this.
Columns
.DisplayInOrder(this.displayedBandsInfo.FirstDisplayedScrollingCol, dataGridViewColumn.Index))
17968
this.
Columns
.Count != 0 &&
18121
columnIndex < this.
Columns
.Count)
18187
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
18432
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
18823
if (rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count)
18835
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
19220
!this.
Columns
[this.ptCurrentCell.X].ReadOnly &&
19270
if (dataGridViewCell != null && rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count)
19318
Debug.Assert(rowIndex < this.Rows.Count && columnIndex < this.
Columns
.Count);
19506
for (int i = 0; i < this.
Columns
.Count; i ++)
19508
if (dataGridViewColumn != this.
Columns
[i] &&
19509
this.
Columns
[i].SortMode != DataGridViewColumnSortMode.NotSortable &&
19511
this.
Columns
[i].DataPropertyName,
19515
Debug.Assert(this.
Columns
[i].IsDataBound, "two columns w/ the same DataPropertyName should be DataBound at the same time");
19516
this.sortedColumn = this.
Columns
[i];
19791
int visibleColumnsWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Displayed);
19793
if (this.
Columns
.Count > 0)
19903
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
19924
dataGridViewColumnNext = this.
Columns
.GetNextColumn(dataGridViewColumn,
19978
dataGridViewColumn = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
20001
dataGridViewColumnNext = this.
Columns
.GetNextColumn(dataGridViewColumn,
20049
if (this.
Columns
.Count > 0 || this.Rows.Count > 0)
20365
leftEdge -= this.
Columns
[this.ptCurrentCell.X].Width-1;
20368
this.
Columns
[this.ptCurrentCell.X].Width, this.Rows.SharedRow(this.ptCurrentCell.Y).GetHeight(this.ptCurrentCell.Y));
20371
if (!this.
Columns
[this.ptCurrentCell.X].Frozen)
20373
int totalVisibleFrozenWidth = this.
Columns
.GetColumnsWidth(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
20707
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
21550
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible,
21731
if (this.ptCurrentCell.X >= 0 && this.
Columns
[this.ptCurrentCell.X].Selected)
21776
if (this.ptCurrentCell.X >= 0 && this.
Columns
[this.ptCurrentCell.X].Selected)
21986
DataGridViewColumn dataGridViewColumn =
Columns
[this.ptCurrentCell.X];
22006
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
22189
if (this.ptCurrentCell.X >= 0 && this.
Columns
[this.ptCurrentCell.X].Selected)
22234
if (this.ptCurrentCell.X >= 0 && this.
Columns
[this.ptCurrentCell.X].Selected)
22458
DataGridViewColumn dataGridViewColumn =
Columns
[this.ptCurrentCell.X];
22507
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
22517
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[this.ptCurrentCell.X],
22671
if (this.
Columns
.DisplayInOrder(this.ptAnchorCell.X, previousVisibleColumnIndex))
22762
if (this.
Columns
[this.ptCurrentCell.X].Selected)
22771
if (this.
Columns
.DisplayInOrder(this.ptAnchorCell.X, previousVisibleColumnIndex))
22835
if (this.
Columns
[this.ptCurrentCell.X].Selected)
23117
if (this.
Columns
[this.ptCurrentCell.X].Selected)
23145
if (this.
Columns
[this.ptCurrentCell.X].Selected)
23185
if (this.
Columns
[this.ptCurrentCell.X].Selected)
23245
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
23485
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
23745
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible,
23756
dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[this.ptCurrentCell.X],
23909
if (this.
Columns
.DisplayInOrder(this.ptAnchorCell.X, nextVisibleColumnIndex))
24000
if (this.
Columns
[this.ptCurrentCell.X].Selected)
24009
if (this.
Columns
.DisplayInOrder(this.ptAnchorCell.X, nextVisibleColumnIndex))
24076
if (this.
Columns
[this.ptCurrentCell.X].Selected)
24348
if (this.
Columns
[this.ptCurrentCell.X].Selected)
24367
if (this.
Columns
[this.ptCurrentCell.X].Selected)
24407
if (this.
Columns
[this.ptCurrentCell.X].Selected)
24496
if (!this.
Columns
[this.ptCurrentCell.X].Selected)
24743
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
25495
if (this.
Columns
.Count > 0 && this.newRowIndex == -1)
25588
DataGridViewColumnCollection dataGridViewCols = this.
Columns
;
25694
if (this.dataConnection != null && this.
Columns
.Count > 0)
25721
foreach(DataGridViewColumn column in
Columns
)
26124
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
26127
!this.
Columns
[columnIndex].Frozen &&
26131
if (this.
Columns
.DisplayInOrder(columnIndex, this.displayedBandsInfo.FirstDisplayedScrollingCol))
26141
columnsToScroll = this.
Columns
.GetColumnCount(DataGridViewElementStates.Visible, columnIndex, this.displayedBandsInfo.FirstDisplayedScrollingCol);
26161
this.
Columns
.DisplayInOrder(this.displayedBandsInfo.LastTotallyDisplayedScrollingCol, columnIndex)))
26177
xColumnRightEdge = GetColumnXFromIndex(columnIndex) - this.
Columns
[columnIndex].Width;
26178
while (xColumnRightEdge < this.layout.Data.X && this.
Columns
.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex))
26180
xColumnRightEdge += this.
Columns
[firstDisplayedScrollingColumn].Width;
26188
firstDisplayedScrollingColumn = this.
Columns
.GetNextColumn(this.
Columns
[firstDisplayedScrollingColumn],
26196
xColumnRightEdge = GetColumnXFromIndex(columnIndex) + this.
Columns
[columnIndex].Width;
26197
while (xColumnRightEdge > this.layout.Data.Right && this.
Columns
.DisplayInOrder(firstDisplayedScrollingColumn, columnIndex))
26199
xColumnRightEdge -= this.
Columns
[firstDisplayedScrollingColumn].Width;
26207
firstDisplayedScrollingColumn = this.
Columns
.GetNextColumn(this.
Columns
[firstDisplayedScrollingColumn],
26233
dataGridViewColumnTmp = this.
Columns
[this.displayedBandsInfo.LastTotallyDisplayedScrollingCol];
26236
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp,
26249
dataGridViewColumnTmp = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
26253
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp,
26265
dataGridViewColumnTmp = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
26272
dataGridViewColumnTmp = this.
Columns
.GetPreviousColumn(dataGridViewColumnTmp,
26288
newFirstVisibleScrollingCol = this.
Columns
[this.displayedBandsInfo.FirstDisplayedScrollingCol];
26294
for (DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible,
26297
dataGridViewColumn = this.
Columns
.GetNextColumn(dataGridViewColumn,
26309
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
26310
Debug.Assert(this.displayedBandsInfo.FirstDisplayedScrollingCol >= -1 && this.displayedBandsInfo.FirstDisplayedScrollingCol < this.
Columns
.Count);
26311
Debug.Assert(this.displayedBandsInfo.LastTotallyDisplayedScrollingCol >= -1 && this.displayedBandsInfo.LastTotallyDisplayedScrollingCol < this.
Columns
.Count);
26314
Debug.Assert(this.
Columns
[columnIndex].Visible);
26654
int maxColumnIndex = this.
Columns
.Count;
26689
int columnIndex = 0, maxColumnIndex = this.
Columns
.Count;
26692
if (!this.
Columns
[columnIndex].Selected)
26711
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
26776
if (index >= this.
Columns
.Count)
26778
index -= this.
Columns
.Count;
26832
columnIndex >= this.
Columns
.Count)
26864
columnIndex < this.
Columns
.Count &&
27023
if (oldCurrentCellX < this.
Columns
.Count && oldCurrentCellY < this.Rows.Count)
27164
if (oldCurrentCellX < this.
Columns
.Count && oldCurrentCellY < this.Rows.Count)
27194
Debug.Assert((this.
Columns
[columnIndexFrom]).DisplayIndex <= (this.
Columns
[columnIndexTo]).DisplayIndex);
27220
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[columnIndex],
27248
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[columnIndex],
27280
if (this.
Columns
.DisplayInOrder(columnIndexFrom, columnIndexTo))
27308
Debug.Assert((this.
Columns
[columnIndexFrom]).DisplayIndex <= (this.
Columns
[columnIndexTo]).DisplayIndex);
27328
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[columnIndex],
27487
columnIndex < this.
Columns
.Count &&
27499
!this.
Columns
[columnIndex].ReadOnly)
27514
if (this.
Columns
[columnIndex].ReadOnly)
27516
this.
Columns
[columnIndex].ReadOnlyInternal = false;
27540
for (int column = columnIndex+1; column < this.
Columns
.Count; column++)
27558
Debug.Assert(columnIndex >= 0 && columnIndex < this.
Columns
.Count);
27560
if (this.
Columns
[columnIndex].ReadOnly != readOnly)
27576
this.
Columns
[columnIndex].ReadOnlyInternal = true;
27581
this.
Columns
[columnIndex].ReadOnlyInternal = false;
27633
if (columnIndex < 0 || columnIndex >= this.
Columns
.Count)
27652
!this.
Columns
[columnIndex].Selected)
27680
this.
Columns
[columnIndex].SelectedInternal = false;
27705
if (this.
Columns
.Count > DATAGRIDVIEW_bulkPaintThreshold)
27721
for (int column = columnIndex+1; column < this.
Columns
.Count; column++)
27749
if (!this.
Columns
[columnIndex].Visible ||
27953
if (columnIndex < 0 || columnIndex >= this.
Columns
.Count)
27961
if (this.
Columns
[columnIndex].Selected != selected)
27969
this.
Columns
[columnIndex].SelectedInternal = true;
27977
this.
Columns
[columnIndex].SelectedInternal = false;
28545
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
28555
dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[this.ptCurrentCell.X],
28701
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
28712
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[this.ptCurrentCell.X],
28727
dataGridViewColumn = this.
Columns
.GetLastColumn(DataGridViewElementStates.Visible,
28906
if (columnIndex < -1 || columnIndex >= this.
Columns
.Count)
28923
if (columnIndex < 0 || columnIndex >= this.
Columns
.Count)
28944
dataGridViewColumnTmp = this.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
28953
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen, DataGridViewElementStates.None);
28964
dataGridViewColumnTmp = this.
Columns
[columnIndexTmp];
28973
dataGridViewColumnTmp = this.
Columns
.GetNextColumn(dataGridViewColumnTmp, DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29211
this.ptMouseEnteredCell.X < this.
Columns
.Count &&
29226
mouseX += ((htiToUse.col == -1) ? this.RowHeadersWidth : this.
Columns
[htiToUse.col].Thickness);
29235
this.ptMouseEnteredCell.X < this.
Columns
.Count &&
29257
if ((this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex) &&
29258
this.
Columns
.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex)) ||
29259
(this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex) &&
29260
this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex)) ||
29273
if (this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex) &&
29274
(this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex) || anchorColumnIndex == oldEdgeColumnIndex) &&
29278
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29290
else if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex) &&
29291
(this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex) || oldEdgeColumnIndex == anchorColumnIndex) &&
29295
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29312
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || anchorColumnIndex == newEdgeColumnIndex)
29335
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || anchorColumnIndex == newEdgeColumnIndex)
29353
else if (this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex) &&
29354
!this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex) &&
29358
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29367
else if (this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex) &&
29370
if (!this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex))
29373
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29384
if (!this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex))
29395
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29408
else if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex) &&
29411
if (!this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex))
29414
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29425
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex))
29428
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29446
else if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex) &&
29447
!this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex) &&
29451
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29460
else if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex))
29462
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29465
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex))
29483
if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, oldEdgeColumnIndex))
29487
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex))
29489
if (!this.
Columns
.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex))
29504
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29525
if ((this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) &&
29539
if (!this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex))
29544
dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29562
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, newEdgeColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex))
29577
else if (this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, newEdgeColumnIndex))
29579
DataGridViewColumn dataGridViewColumn = this.
Columns
.GetPreviousColumn(this.
Columns
[newEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29582
if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (newEdgeColumnIndex == anchorColumnIndex))
29600
if ((this.
Columns
.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (newEdgeColumnIndex == anchorColumnIndex)) &&
29613
if (!this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex))
29618
dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29639
if ((this.
Columns
.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex)) &&
29652
if (!this.
Columns
.DisplayInOrder(oldEdgeColumnIndex, anchorColumnIndex))
29657
dataGridViewColumn = this.
Columns
.GetNextColumn(this.
Columns
[oldEdgeColumnIndex], DataGridViewElementStates.Visible, DataGridViewElementStates.None);
29675
if (this.
Columns
.DisplayInOrder(newEdgeColumnIndex, anchorColumnIndex) || (anchorColumnIndex == newEdgeColumnIndex))
29696
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex))
29722
if (this.
Columns
.DisplayInOrder(anchorColumnIndex, oldEdgeColumnIndex))
29876
dataGridViewCell = this.
Columns
[hti.col].HeaderCell;
winforms\Managed\System\WinForms\DataGridViewRow.cs (10)
1199
DataGridViewColumnCollection dataGridViewColumns = dataGridView.
Columns
;
1227
Debug.Assert(this.Cells.Count == dataGridView.
Columns
.Count);
1419
DataGridViewColumn dataGridViewColumn = this.DataGridView.
Columns
[dataGridViewCell.ColumnIndex];
1615
DataGridViewColumn dataGridViewColumn = dataGridView.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen);
1634
dataGridViewColumnNext = dataGridView.
Columns
.GetNextColumn(dataGridViewColumn,
1700
dataGridViewColumn = (DataGridViewColumn)dataGridView.
Columns
[dataGridView.FirstDisplayedScrollingColumnIndex];
1721
dataGridViewColumnNext = dataGridView.
Columns
.GetNextColumn(dataGridViewColumn,
2183
int columnIndex = this.owner.DataGridView.
Columns
.ActualDisplayIndexToColumnIndex(index, DataGridViewElementStates.Visible);
2195
int result = this.owner.DataGridView.
Columns
.GetColumnCount(DataGridViewElementStates.Visible);
2335
int firstVisibleCell = dataGridView.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible).Index;
winforms\Managed\System\WinForms\DataGridViewRowCollection.cs (34)
287
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
342
if (this.DataGridView.
Columns
.Count == 0)
347
if (this.DataGridView.RowTemplate.Cells.Count > this.DataGridView.
Columns
.Count)
353
Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.
Columns
.Count);
390
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
466
if (this.DataGridView.
Columns
.Count == 0)
495
if (this.DataGridView.
Columns
.Count == 0)
510
if (this.DataGridView.RowTemplate.Cells.Count > this.DataGridView.
Columns
.Count)
516
Debug.Assert(rowTemplate.Cells.Count == this.DataGridView.
Columns
.Count);
525
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
558
if (this.DataGridView.
Columns
.Count == 0)
562
if (dataGridViewRow.Cells.Count > this.DataGridView.
Columns
.Count)
582
Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.
Columns
.Count);
592
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
832
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
883
if (this.DataGridView.
Columns
.Count == 0)
895
Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.
Columns
.Count);
901
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
977
this.DataGridView.
Columns
.Count != 0 &&
1541
if (this.DataGridView.
Columns
.Count == 0)
1546
if (this.DataGridView.RowTemplate.Cells.Count > this.DataGridView.
Columns
.Count)
1559
Debug.Assert(rowTemplate.Cells.Count == this.DataGridView.
Columns
.Count);
1568
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
1605
if (this.DataGridView.
Columns
.Count == 0)
1610
if (dataGridViewRow.Cells.Count > this.DataGridView.
Columns
.Count)
1637
if (this.DataGridView.
Columns
.Count == 0)
1641
if (dataGridViewRow.Cells.Count > this.DataGridView.
Columns
.Count)
1647
Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.
Columns
.Count);
1657
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
1846
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
1910
if (this.DataGridView.
Columns
.Count == 0)
1923
Debug.Assert(dataGridViewRow.Cells.Count == this.DataGridView.
Columns
.Count);
1931
dataGridViewCell.OwningColumnInternal = this.DataGridView.
Columns
[columnIndex];
2503
int columnCount = this.DataGridView.
Columns
.Count;
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (2)
1348
if (this.Owner.OwningRow != null && this.Owner.DataGridView.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) > 0)
1475
if (this.Owner.DataGridView.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) > 0)
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (4)
620
if (this.Owner.DataGridView.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0)
643
if (this.Owner.DataGridView.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) > 0 &&
649
DataGridViewColumn col = this.Owner.DataGridView.
Columns
.GetFirstColumn(DataGridViewElementStates.Visible);
688
if (dataGridView.
Columns
.GetColumnCount(DataGridViewElementStates.Visible) == 0)
winforms\Managed\System\WinForms\DataGridViewTopRowAccessibleObject.cs (4)
158
if (index < this.owner.
Columns
.GetColumnCount(DataGridViewElementStates.Visible))
160
int actualColumnIndex = this.owner.
Columns
.ActualDisplayIndexToColumnIndex(index, DataGridViewElementStates.Visible);
161
return this.owner.
Columns
[actualColumnIndex].HeaderCell.AccessibilityObject;
176
int result = this.owner.
Columns
.GetColumnCount(DataGridViewElementStates.Visible);
System.WorkflowServices (4)
System\Workflow\Activities\Design\ServiceOperationDetailViewControl.cs (4)
611
this.parametersGrid.
Columns
.Clear();
617
this.parametersGrid.
Columns
.Add(nameColumn);
630
this.parametersGrid.
Columns
.Add(typeColumn);
641
this.parametersGrid.
Columns
.Add(directionColumn);