275 writes to DisplayIndex
System.Windows.Forms (7)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
1556clonedColumns[clonedColumnsCount].DisplayIndex = dataGridViewCols[i].DisplayIndex; 5058dataGridViewColumnClone.DisplayIndex = dataGridViewColumn.DisplayIndex; 5065dataGridViewColumnClone.DisplayIndex = dataGridViewColumn.DisplayIndex; 6081Columns[_trackColumn].DisplayIndex = 0; 6085Columns[_trackColumn].DisplayIndex = Columns[previousColumnIndex].DisplayIndex + 1; 6089Columns[_trackColumn].DisplayIndex = Columns[previousColumnIndex].DisplayIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (1)
885dataGridViewColumn.DisplayIndex = columnIndex;
System.Windows.Forms.Design (10)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (3)
98column.DisplayIndex = -1; 126column.DisplayIndex = -1; 548cols[i].DisplayIndex = -1;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (5)
148newColumn.DisplayIndex = -1; 441_columnsPrivateCopy[i].DisplayIndex = i; 691item.DataGridViewColumn.DisplayIndex = -1; 735item.DataGridViewColumn.DisplayIndex = -1; 1131col.DisplayIndex = -1;
System\Windows\Forms\Design\DataGridViewDesigner.cs (2)
333e.Column.DisplayIndex = -1; 689columnsToBeAdded[i].DisplayIndex = -1;
System.Windows.Forms.Tests (258)
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (12)
1410dataGridView.Columns[0].DisplayIndex = 2; 1411dataGridView.Columns[1].DisplayIndex = 1; 1412dataGridView.Columns[2].DisplayIndex = 0; 1432dataGridView.Columns[0].DisplayIndex = 2; 1433dataGridView.Columns[1].DisplayIndex = 1; 1434dataGridView.Columns[2].DisplayIndex = 0; 1454dataGridView.Columns[0].DisplayIndex = 2; 1455dataGridView.Columns[1].DisplayIndex = 1; 1456dataGridView.Columns[2].DisplayIndex = 0; 1476dataGridView.Columns[0].DisplayIndex = 2; 1477dataGridView.Columns[1].DisplayIndex = 1; 1478dataGridView.Columns[2].DisplayIndex = 0;
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (36)
950dataGridView.Columns[0].DisplayIndex = 2; 951dataGridView.Columns[1].DisplayIndex = 1; 952dataGridView.Columns[2].DisplayIndex = 0; 972dataGridView.Columns[0].DisplayIndex = 2; 973dataGridView.Columns[1].DisplayIndex = 1; 974dataGridView.Columns[2].DisplayIndex = 0; 995dataGridView.Columns[0].DisplayIndex = 2; 996dataGridView.Columns[1].DisplayIndex = 1; 997dataGridView.Columns[2].DisplayIndex = 0; 1018dataGridView.Columns[0].DisplayIndex = 2; 1019dataGridView.Columns[1].DisplayIndex = 1; 1020dataGridView.Columns[2].DisplayIndex = 0; 1257dataGridView.Columns[0].DisplayIndex = 2; 1258dataGridView.Columns[1].DisplayIndex = 1; 1259dataGridView.Columns[2].DisplayIndex = 0; 1281dataGridView.Columns[0].DisplayIndex = 2; 1282dataGridView.Columns[1].DisplayIndex = 1; 1283dataGridView.Columns[2].DisplayIndex = 0; 1303dataGridView.Columns[0].DisplayIndex = 2; 1304dataGridView.Columns[1].DisplayIndex = 1; 1305dataGridView.Columns[2].DisplayIndex = 0; 1325dataGridView.Columns[0].DisplayIndex = 2; 1326dataGridView.Columns[1].DisplayIndex = 1; 1327dataGridView.Columns[2].DisplayIndex = 0; 1348dataGridView.Columns[0].DisplayIndex = 2; 1349dataGridView.Columns[1].DisplayIndex = 1; 1350dataGridView.Columns[2].DisplayIndex = 0; 1370dataGridView.Columns[0].DisplayIndex = 2; 1371dataGridView.Columns[1].DisplayIndex = 1; 1372dataGridView.Columns[2].DisplayIndex = 0; 1390dataGridView.Columns[0].DisplayIndex = 2; 1391dataGridView.Columns[1].DisplayIndex = 1; 1392dataGridView.Columns[2].DisplayIndex = 0; 1410dataGridView.Columns[0].DisplayIndex = 2; 1411dataGridView.Columns[1].DisplayIndex = 1; 1412dataGridView.Columns[2].DisplayIndex = 0;
System\Windows\Forms\AccessibleObjects\DataGridViewColumnHeaderCellAccessibleObjectTests.cs (48)
577control.Columns[0].DisplayIndex = 2; 578control.Columns[1].DisplayIndex = 1; 579control.Columns[2].DisplayIndex = 0; 605control.Columns[0].DisplayIndex = 2; 607control.Columns[1].DisplayIndex = 1; 608control.Columns[2].DisplayIndex = 0; 631control.Columns[0].DisplayIndex = 2; 632control.Columns[1].DisplayIndex = 1; 634control.Columns[2].DisplayIndex = 0; 657control.Columns[0].DisplayIndex = 2; 658control.Columns[1].DisplayIndex = 1; 659control.Columns[2].DisplayIndex = 0; 683control.Columns[0].DisplayIndex = 2; 684control.Columns[1].DisplayIndex = 1; 685control.Columns[2].DisplayIndex = 0; 708control.Columns[0].DisplayIndex = 2; 710control.Columns[1].DisplayIndex = 1; 711control.Columns[2].DisplayIndex = 0; 731control.Columns[0].DisplayIndex = 2; 732control.Columns[1].DisplayIndex = 1; 734control.Columns[2].DisplayIndex = 0; 754control.Columns[0].DisplayIndex = 2; 755control.Columns[1].DisplayIndex = 1; 756control.Columns[2].DisplayIndex = 0; 777control.Columns[0].DisplayIndex = 2; 778control.Columns[1].DisplayIndex = 1; 779control.Columns[2].DisplayIndex = 0; 805control.Columns[0].DisplayIndex = 2; 807control.Columns[1].DisplayIndex = 1; 808control.Columns[2].DisplayIndex = 0; 831control.Columns[0].DisplayIndex = 2; 832control.Columns[1].DisplayIndex = 1; 834control.Columns[2].DisplayIndex = 0; 857control.Columns[0].DisplayIndex = 2; 858control.Columns[1].DisplayIndex = 1; 859control.Columns[2].DisplayIndex = 0; 883control.Columns[0].DisplayIndex = 2; 884control.Columns[1].DisplayIndex = 1; 885control.Columns[2].DisplayIndex = 0; 908control.Columns[0].DisplayIndex = 2; 910control.Columns[1].DisplayIndex = 1; 911control.Columns[2].DisplayIndex = 0; 931control.Columns[0].DisplayIndex = 2; 932control.Columns[1].DisplayIndex = 1; 934control.Columns[2].DisplayIndex = 0; 954control.Columns[0].DisplayIndex = 2; 955control.Columns[1].DisplayIndex = 1; 956control.Columns[2].DisplayIndex = 0;
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (72)
1376dataGridView.Columns[0].DisplayIndex = 2; 1377dataGridView.Columns[1].DisplayIndex = 1; 1378dataGridView.Columns[2].DisplayIndex = 0; 1396dataGridView.Columns[0].DisplayIndex = 2; 1397dataGridView.Columns[1].DisplayIndex = 1; 1398dataGridView.Columns[2].DisplayIndex = 0; 1417dataGridView.Columns[0].DisplayIndex = 2; 1418dataGridView.Columns[1].DisplayIndex = 1; 1419dataGridView.Columns[2].DisplayIndex = 0; 1438dataGridView.Columns[0].DisplayIndex = 2; 1439dataGridView.Columns[1].DisplayIndex = 1; 1440dataGridView.Columns[2].DisplayIndex = 0; 1459dataGridView.Columns[0].DisplayIndex = 2; 1460dataGridView.Columns[1].DisplayIndex = 1; 1461dataGridView.Columns[2].DisplayIndex = 0; 1479dataGridView.Columns[0].DisplayIndex = 2; 1480dataGridView.Columns[1].DisplayIndex = 1; 1481dataGridView.Columns[2].DisplayIndex = 0; 1500dataGridView.Columns[0].DisplayIndex = 2; 1501dataGridView.Columns[1].DisplayIndex = 1; 1502dataGridView.Columns[2].DisplayIndex = 0; 1521dataGridView.Columns[0].DisplayIndex = 2; 1522dataGridView.Columns[1].DisplayIndex = 1; 1523dataGridView.Columns[2].DisplayIndex = 0; 1701dataGridView.Columns[0].DisplayIndex = 2; 1702dataGridView.Columns[1].DisplayIndex = 1; 1703dataGridView.Columns[2].DisplayIndex = 0; 1721dataGridView.Columns[0].DisplayIndex = 2; 1722dataGridView.Columns[1].DisplayIndex = 1; 1723dataGridView.Columns[2].DisplayIndex = 0; 1742dataGridView.Columns[0].DisplayIndex = 2; 1743dataGridView.Columns[1].DisplayIndex = 1; 1744dataGridView.Columns[2].DisplayIndex = 0; 1763dataGridView.Columns[0].DisplayIndex = 2; 1764dataGridView.Columns[1].DisplayIndex = 1; 1765dataGridView.Columns[2].DisplayIndex = 0; 1784dataGridView.Columns[0].DisplayIndex = 2; 1785dataGridView.Columns[1].DisplayIndex = 1; 1786dataGridView.Columns[2].DisplayIndex = 0; 1804dataGridView.Columns[0].DisplayIndex = 2; 1805dataGridView.Columns[1].DisplayIndex = 1; 1806dataGridView.Columns[2].DisplayIndex = 0; 1825dataGridView.Columns[0].DisplayIndex = 2; 1826dataGridView.Columns[1].DisplayIndex = 1; 1827dataGridView.Columns[2].DisplayIndex = 0; 1846dataGridView.Columns[0].DisplayIndex = 2; 1847dataGridView.Columns[1].DisplayIndex = 1; 1848dataGridView.Columns[2].DisplayIndex = 0; 2068dataGridView.Columns[0].DisplayIndex = 2; 2069dataGridView.Columns[1].DisplayIndex = 1; 2070dataGridView.Columns[2].DisplayIndex = 0; 2091dataGridView.Columns[0].DisplayIndex = 2; 2092dataGridView.Columns[1].DisplayIndex = 1; 2093dataGridView.Columns[2].DisplayIndex = 0; 2113dataGridView.Columns[0].DisplayIndex = 2; 2114dataGridView.Columns[1].DisplayIndex = 1; 2115dataGridView.Columns[2].DisplayIndex = 0; 2135dataGridView.Columns[0].DisplayIndex = 2; 2136dataGridView.Columns[1].DisplayIndex = 1; 2137dataGridView.Columns[2].DisplayIndex = 0; 2157dataGridView.Columns[0].DisplayIndex = 2; 2158dataGridView.Columns[1].DisplayIndex = 1; 2159dataGridView.Columns[2].DisplayIndex = 0; 2182dataGridView.Columns[0].DisplayIndex = 2; 2183dataGridView.Columns[1].DisplayIndex = 1; 2184dataGridView.Columns[2].DisplayIndex = 0; 2206dataGridView.Columns[0].DisplayIndex = 2; 2207dataGridView.Columns[1].DisplayIndex = 1; 2208dataGridView.Columns[2].DisplayIndex = 0; 2230dataGridView.Columns[0].DisplayIndex = 2; 2231dataGridView.Columns[1].DisplayIndex = 1; 2232dataGridView.Columns[2].DisplayIndex = 0;
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (4)
198control.Columns[0].DisplayIndex = 1; 199control.Columns[1].DisplayIndex = 0; 216control.Columns[0].DisplayIndex = 1; 217control.Columns[1].DisplayIndex = 0;
System\Windows\Forms\AccessibleObjects\DataGridViewTopLeftHeaderCellAccessibleObjectTests.cs (4)
231control.Columns[0].DisplayIndex = 1; 232control.Columns[1].DisplayIndex = 0; 250control.Columns[0].DisplayIndex = 1; 251control.Columns[1].DisplayIndex = 0;
System\Windows\Forms\AccessibleObjects\DataGridViewTopRowAccessibleObjectTests.cs (72)
236dataGridView.Columns[0].DisplayIndex = 2; 237dataGridView.Columns[1].DisplayIndex = 1; 238dataGridView.Columns[2].DisplayIndex = 0; 256dataGridView.Columns[0].DisplayIndex = 2; 257dataGridView.Columns[1].DisplayIndex = 1; 258dataGridView.Columns[2].DisplayIndex = 0; 277dataGridView.Columns[0].DisplayIndex = 2; 278dataGridView.Columns[1].DisplayIndex = 1; 279dataGridView.Columns[2].DisplayIndex = 0; 298dataGridView.Columns[0].DisplayIndex = 2; 299dataGridView.Columns[1].DisplayIndex = 1; 300dataGridView.Columns[2].DisplayIndex = 0; 319dataGridView.Columns[0].DisplayIndex = 2; 320dataGridView.Columns[1].DisplayIndex = 1; 321dataGridView.Columns[2].DisplayIndex = 0; 339dataGridView.Columns[0].DisplayIndex = 2; 340dataGridView.Columns[1].DisplayIndex = 1; 341dataGridView.Columns[2].DisplayIndex = 0; 360dataGridView.Columns[0].DisplayIndex = 2; 361dataGridView.Columns[1].DisplayIndex = 1; 362dataGridView.Columns[2].DisplayIndex = 0; 381dataGridView.Columns[0].DisplayIndex = 2; 382dataGridView.Columns[1].DisplayIndex = 1; 383dataGridView.Columns[2].DisplayIndex = 0; 564dataGridView.Columns[0].DisplayIndex = 2; 565dataGridView.Columns[1].DisplayIndex = 1; 566dataGridView.Columns[2].DisplayIndex = 0; 584dataGridView.Columns[0].DisplayIndex = 2; 585dataGridView.Columns[1].DisplayIndex = 1; 586dataGridView.Columns[2].DisplayIndex = 0; 605dataGridView.Columns[0].DisplayIndex = 2; 606dataGridView.Columns[1].DisplayIndex = 1; 607dataGridView.Columns[2].DisplayIndex = 0; 626dataGridView.Columns[0].DisplayIndex = 2; 627dataGridView.Columns[1].DisplayIndex = 1; 628dataGridView.Columns[2].DisplayIndex = 0; 647dataGridView.Columns[0].DisplayIndex = 2; 648dataGridView.Columns[1].DisplayIndex = 1; 649dataGridView.Columns[2].DisplayIndex = 0; 667dataGridView.Columns[0].DisplayIndex = 2; 668dataGridView.Columns[1].DisplayIndex = 1; 669dataGridView.Columns[2].DisplayIndex = 0; 688dataGridView.Columns[0].DisplayIndex = 2; 689dataGridView.Columns[1].DisplayIndex = 1; 690dataGridView.Columns[2].DisplayIndex = 0; 709dataGridView.Columns[0].DisplayIndex = 2; 710dataGridView.Columns[1].DisplayIndex = 1; 711dataGridView.Columns[2].DisplayIndex = 0; 931dataGridView.Columns[0].DisplayIndex = 2; 932dataGridView.Columns[1].DisplayIndex = 1; 933dataGridView.Columns[2].DisplayIndex = 0; 954dataGridView.Columns[0].DisplayIndex = 2; 955dataGridView.Columns[1].DisplayIndex = 1; 956dataGridView.Columns[2].DisplayIndex = 0; 976dataGridView.Columns[0].DisplayIndex = 2; 977dataGridView.Columns[1].DisplayIndex = 1; 978dataGridView.Columns[2].DisplayIndex = 0; 998dataGridView.Columns[0].DisplayIndex = 2; 999dataGridView.Columns[1].DisplayIndex = 1; 1000dataGridView.Columns[2].DisplayIndex = 0; 1020dataGridView.Columns[0].DisplayIndex = 2; 1021dataGridView.Columns[1].DisplayIndex = 1; 1022dataGridView.Columns[2].DisplayIndex = 0; 1045dataGridView.Columns[0].DisplayIndex = 2; 1046dataGridView.Columns[1].DisplayIndex = 1; 1047dataGridView.Columns[2].DisplayIndex = 0; 1069dataGridView.Columns[0].DisplayIndex = 2; 1070dataGridView.Columns[1].DisplayIndex = 1; 1071dataGridView.Columns[2].DisplayIndex = 0; 1093dataGridView.Columns[0].DisplayIndex = 2; 1094dataGridView.Columns[1].DisplayIndex = 1; 1095dataGridView.Columns[2].DisplayIndex = 0;
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (10)
260DisplayIndex = displayIndex 264DisplayIndex = 0 268DisplayIndex = 1 368column1.DisplayIndex = 1; 495DisplayIndex = 1 500DisplayIndex = 0, 507DisplayIndex = 1 519DisplayIndex = 1 524DisplayIndex = 0 530DisplayIndex = 1
92 references to DisplayIndex
System.Windows.Forms (68)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (40)
1556clonedColumns[clonedColumnsCount].DisplayIndex = dataGridViewCols[i].DisplayIndex; 4942Debug.Assert(dataGridViewColumn.DisplayIndex >= 0); 4951if (dataGridViewColumnTmp.DisplayIndex > dataGridViewColumn.DisplayIndex) 4953dataGridViewColumnTmp.DisplayIndexInternal = dataGridViewColumnTmp.DisplayIndex - 1; 4976Debug.Assert(dataGridViewColumn.DisplayIndex >= 0); 4985if (dataGridViewColumnTmp != dataGridViewColumn && dataGridViewColumnTmp.DisplayIndex >= dataGridViewColumn.DisplayIndex) 4987dataGridViewColumnTmp.DisplayIndexInternal = dataGridViewColumnTmp.DisplayIndex + 1; 5011if (dataGridViewColumn.DisplayIndex == -1 || dataGridViewColumn.DisplayIndex > Columns.Count) 5017Debug.Assert(dataGridViewColumn.DisplayIndex >= 0 && dataGridViewColumn.DisplayIndex <= Columns.Count); 5018anticipatedColumnDisplayIndex = dataGridViewColumn.DisplayIndex; // The specified DisplayIndex is just fine. 5058dataGridViewColumnClone.DisplayIndex = dataGridViewColumn.DisplayIndex; 5065dataGridViewColumnClone.DisplayIndex = dataGridViewColumn.DisplayIndex; 5137Debug.Assert(newDisplayIndex != dataGridViewColumn.DisplayIndex); 5146|| (newDisplayIndex < dataGridViewColumn.DisplayIndex && dataGridViewColumn.Frozen) 5147|| (newDisplayIndex > dataGridViewColumn.DisplayIndex && !dataGridViewColumn.Frozen)) 5154if (newDisplayIndex < dataGridViewColumn.DisplayIndex) 6083else if (Columns[_trackColumn].DisplayIndex > Columns[previousColumnIndex].DisplayIndex) 6085Columns[_trackColumn].DisplayIndex = Columns[previousColumnIndex].DisplayIndex + 1; 6089Columns[_trackColumn].DisplayIndex = Columns[previousColumnIndex].DisplayIndex; 10538if (dataGridViewColumn.DisplayIndex == -1 || dataGridViewColumn.DisplayIndex >= Columns.Count) 13355Debug.Assert(newDisplayIndex != dataGridViewColumn.DisplayIndex); 13371if (newDisplayIndex < dataGridViewColumn.DisplayIndex) 13377if (newDisplayIndex <= dataGridViewColumnTmp.DisplayIndex && dataGridViewColumnTmp.DisplayIndex < dataGridViewColumn.DisplayIndex) 13379dataGridViewColumnTmp.DisplayIndexInternal = dataGridViewColumnTmp.DisplayIndex + 1; 13390if (dataGridViewColumn.DisplayIndex < dataGridViewColumnTmp.DisplayIndex && dataGridViewColumnTmp.DisplayIndex <= newDisplayIndex) 13392dataGridViewColumnTmp.DisplayIndexInternal = dataGridViewColumnTmp.DisplayIndex - 1; 27136Debug.Assert((Columns[columnIndexFrom]).DisplayIndex <= (Columns[columnIndexTo]).DisplayIndex); 27258Debug.Assert((Columns[columnIndexFrom]).DisplayIndex <= (Columns[columnIndexTo]).DisplayIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
277throw new ArgumentOutOfRangeException(nameof(DisplayIndex), value, SR.DataGridViewColumn_DisplayIndexTooNegative);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.ColumnOrderComparer.cs (2)
19return x.DisplayIndex - y.DisplayIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (25)
200if (dataGridViewColumn.DisplayIndex != -1) 217if (dataGridViewColumn.DisplayIndex < smallestDisplayIndex) 219smallestDisplayIndex = dataGridViewColumn.DisplayIndex; 233if (dataGridViewColumn.DisplayIndex == -1) 359int displayIndex1 = _items[columnIndex1].DisplayIndex; 360int displayIndex2 = _items[columnIndex2].DisplayIndex; 372if (dataGridViewColumn.DisplayIndex == displayIndex) 381if (dataGridViewColumn.DisplayIndex == displayIndex) 750(dataGridViewColumn.DisplayIndex > dataGridViewColumnStart.DisplayIndex || 751(dataGridViewColumn.DisplayIndex == dataGridViewColumnStart.DisplayIndex && 754if (dataGridViewColumn.DisplayIndex < displayIndexMin || 755(dataGridViewColumn.DisplayIndex == displayIndexMin && 759displayIndexMin = dataGridViewColumn.DisplayIndex; 823(dataGridViewColumn.DisplayIndex < dataGridViewColumnStart.DisplayIndex || 824(dataGridViewColumn.DisplayIndex == dataGridViewColumnStart.DisplayIndex && 827if (dataGridViewColumn.DisplayIndex > displayIndexMax || 828(dataGridViewColumn.DisplayIndex == displayIndexMax && 832displayIndexMax = dataGridViewColumn.DisplayIndex; 882int originalDisplayIndex = dataGridViewColumn.DisplayIndex; 1170if (_itemsSorted[index + 1].DisplayIndex != 1171_itemsSorted[index].DisplayIndex + 1)
System.Windows.Forms.Tests (24)
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (22)
48Assert.Equal(0, column1.DisplayIndex); 56Assert.Equal(0, column1.DisplayIndex); 59Assert.Equal(1, column2.DisplayIndex); 76Assert.Equal(0, column1.DisplayIndex); 84Assert.Equal(0, column1.DisplayIndex); 87Assert.Equal(1, column2.DisplayIndex); 126Assert.Equal(0, column1.DisplayIndex); 134Assert.Equal(0, column1.DisplayIndex); 137Assert.Equal(1, column2.DisplayIndex); 200Assert.Equal(0, column1.DisplayIndex); 208Assert.Equal(0, column1.DisplayIndex); 211Assert.Equal(1, column2.DisplayIndex); 234Assert.Equal(0, column1.DisplayIndex); 242Assert.Equal(0, column1.DisplayIndex); 245Assert.Equal(1, column2.DisplayIndex); 276Assert.Equal(0, column1.DisplayIndex); 284Assert.Equal(1, column1.DisplayIndex); 287Assert.Equal(0, column2.DisplayIndex); 295Assert.Equal(2, column1.DisplayIndex); 298Assert.Equal(0, column2.DisplayIndex); 301Assert.Equal(1, column3.DisplayIndex); 320Assert.Equal(0, column.DisplayIndex);
System\Windows\Forms\DataGridViewColumnTests.cs (2)
23Assert.Equal(-1, column.DisplayIndex); 74Assert.Equal(-1, column.DisplayIndex);