KGy SOFT

SortableBindingListTInsertItem Method

KGy SOFT Core Libraries Help

Namespace:  KGySoft.ComponentModel
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 6.0.0-rc.1
Syntax

protected override void InsertItem(
	int index,
	T item
)

Parameters

index
Type: SystemInt32
The zero-based index at which item should be inserted.
item
Type: T
The object to insert.
Remarks

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 indicating the index of the item that was inserted.
  4. If both IsSorted and SortOnChange properties are  and the position of the new item would break the sort order, then a new sort is immediately applied, which raises a ListChanged event of type Reset.

See Also

Reference