KGy SOFT

SortableBindingListTSetItem Method

KGy SOFT Core Libraries Help
Replaces the item at the specified index.

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

protected override void SetItem(
	int index,
	T item
)

Parameters

index
Type: SystemInt32
The zero-based index of the element to replace.
item
Type: T
The new value for the element at the specified index.
Remarks

SetItem performs the following operations:

  1. Raises a ListChanged event of type ItemChanged indicating the index of the item that was set.
  2. 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