New to Telerik UI for WinForms? Start a free 30-day trial

Indexes a collection view with a list and uses binary insertion when sorting is active.

In the sorted path, items that compare equal to an existing item are not inserted.

Definition

Namespace:Telerik.Collections.Generic

Assembly:Telerik.WinControls.dll

Type Parameters:

T

The data-item type stored by the index.

Syntax:

C#
public class ListIndex<T> : Index<T>, IReadOnlyCollection<T>, IEnumerable where T : IDataItem

Inheritance: objectIndex<T>ListIndex<T>

Implements: IEnumerableIReadOnlyCollection<T>

Inherited Members Index<T>.GetItemsOnPage(int)Index<T>.GetItemPageIndex(T)Index<T>.Contains(T)Index<T>.CopyTo(T[], int)Index<T>.IndexOf(T)Index<T>.GetEnumerator()Index<T>.CollectionViewIndex<T>.CountIndex<T>.this[int]...

Constructors

Initializes an index using an explicit source sequence and the specified view's operations.

C#
public ListIndex(RadCollectionView<T> collectionView, IEnumerable<T> source)
Parameters:collectionViewRadCollectionView<T>

The view whose filtering and sorting settings determine the indexed items.

sourceIEnumerable<T>

The sequence to index.

Initializes an index using the source sequence of the specified view.

C#
public ListIndex(RadCollectionView<T> collectionView)
Parameters:collectionViewRadCollectionView<T>

The view whose source and operations determine the indexed items.

Properties

Items

IList<T>

Gets the current indexed items, rebuilding them when the view version changes.

C#
public override IList<T> Items { get; }

Overrides: Index<T>.Items

Methods

Replaces the source sequence and initializes the index from it.

C#
public override void Load(IEnumerable<T> source)
Parameters:sourceIEnumerable<T>

The sequence to index.

Overrides: Index<T>.Load(IEnumerable<T>)

Rebuilds the indexed list when its cached version differs from the collection view.

C#
protected override void Perform()

Overrides: Index<T>.Perform()

Increments the cached version marker used by Perform().

C#
protected override void SetDirty()

Overrides: Index<T>.SetDirty()