ObservableBindingListTInsertItem Method

Inserts an element into the ObservableBindingListT at the specified index.


Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0
protected override void InsertItem(
	int index,
	T item


index  Int32
The zero-based index at which item should be inserted.
item  T
The object to insert.


InsertItem performs the following operations:

  1. Calls EndNew to commit the last possible uncommitted item added by the AddNew method.
  2. Inserts the item at the specified index.
  3. Raises a ListChanged event of type ItemChanged and CollectionChanged event of type Add indicating the index of the item that was inserted.

See Also