46 references to NewIndex
PresentationFramework (5)
src\Framework\System\Windows\Data\BindingListCollectionView.cs (5)
1918
int index = args.
NewIndex
;
2002
if (args.OldIndex < _newItemIndex && _newItemIndex < args.
NewIndex
)
2006
else if (args.
NewIndex
<= _newItemIndex && _newItemIndex < args.OldIndex)
2013
_cachedList.Insert(args.
NewIndex
, item);
2023
item = InternalList[args.
NewIndex
];
System.Data (9)
fx\src\data\System\Data\DataView.cs (9)
1309
if (addNewMoved.
NewIndex
== addNewMoved.OldIndex) {
1403
Debug.Assert(((ListChangedType.ItemChanged == e.ListChangedType) && ((e.
NewIndex
== e.OldIndex) || (-1 == e.OldIndex))) ||
1404
(ListChangedType.ItemMoved == e.ListChangedType && (e.
NewIndex
!= e.OldIndex) && (0 <= e.OldIndex)),
1407
Debug.Assert(0 <= e.
NewIndex
, "negative NewIndex");
1408
if (0 <= e.
NewIndex
) {
1409
DataRow dr = GetRow(e.
NewIndex
);
1428
if ((col != null) && (e.
NewIndex
== e.OldIndex)) {
1429
ListChangedEventArgs newEventArg = new ListChangedEventArgs(e.ListChangedType, e.
NewIndex
, new DataColumnPropertyDescriptor(col));
1438
this[e.
NewIndex
].RaisePropertyChangedEvent(propertyName);
System.Windows.Forms (32)
winforms\Managed\System\WinForms\CurrencyManager.cs (20)
608
dbe = new ListChangedEventArgs(ListChangedType.ItemAdded, e.
NewIndex
, e.OldIndex);
609
} else if (e.ListChangedType == ListChangedType.ItemMoved && e.
NewIndex
< 0) {
610
dbe = new ListChangedEventArgs(ListChangedType.ItemDeleted, e.OldIndex, e.
NewIndex
);
629
if (dbe.ListChangedType == System.ComponentModel.ListChangedType.Reset && e.
NewIndex
== -1) {
665
Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemAdded " + dbe.
NewIndex
.ToString(CultureInfo.InvariantCulture));
666
if (dbe.
NewIndex
<= listposition && listposition < list.Count - 1) {
678
} else if (dbe.
NewIndex
== this.listposition && this.listposition == list.Count - 1 && this.listposition != -1) {
699
Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemDeleted " + dbe.
NewIndex
.ToString(CultureInfo.InvariantCulture));
700
if (dbe.
NewIndex
== listposition) {
710
if (dbe.
NewIndex
< listposition) {
722
Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemChanged " + dbe.
NewIndex
.ToString(CultureInfo.InvariantCulture));
724
if (dbe.
NewIndex
== this.listposition) {
728
OnItemChanged(new ItemChangedEventArgs(dbe.
NewIndex
));
731
Debug.WriteLineIf(CompModSwitches.DataCursor.TraceVerbose, "System.ComponentModel.ListChangedType.ItemMoved " + dbe.
NewIndex
.ToString(CultureInfo.InvariantCulture));
734
ChangeRecordState(dbe.
NewIndex
, true, this.Position > -1 && this.Position < list.Count, true, false);
736
else if (dbe.
NewIndex
== listposition) { // current was moved
984
if (e.
NewIndex
== lastGoodKnownRow)
991
if (e.
NewIndex
<= lastGoodKnownRow && lastGoodKnownRow < this.List.Count - 1)
996
lastGoodKnownRow = e.
NewIndex
;
999
if (e.
NewIndex
== lastGoodKnownRow)
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (12)
514
if (!this.dataConnectionState[DATACONNECTIONSTATE_finishedAddNew] && this.owner.newRowIndex == e.
NewIndex
)
685
if (this.owner.NewRowIndex == -1 || e.
NewIndex
!= this.owner.Rows.Count)
687
this.owner.Rows.InsertInternal(e.
NewIndex
, this.owner.RowTemplateClone, true /*force*/);
698
this.owner.Rows.RemoveAtInternal(e.
NewIndex
, true /*force*/);
705
Debug.Assert(e.
NewIndex
> -1, "how can we move an item outside of the list?");
706
int lo = Math.Min(e.OldIndex, e.
NewIndex
);
707
int hi = Math.Max(e.OldIndex, e.
NewIndex
);
711
Debug.Assert(e.
NewIndex
!= -1, "the item changed event does not cover changes to the entire list");
726
this.owner.OnCellCommonChange(columnIndex, e.
NewIndex
);
731
this.owner.OnCellCommonChange(columnIndex, e.
NewIndex
);
736
this.owner.InvalidateCell(-1, e.
NewIndex
);
738
if (this.owner.CurrentCellAddress.Y == e.
NewIndex
&& this.owner.IsCurrentCellInEditMode)