Index<T>
Base class for indexes that expose a collection view's current filtered and sorted item sequence.
Definition
Namespace:Telerik.Collections.Generic
Assembly:Telerik.WinControls.dll
Type Parameters:
T
The data-item type stored by the index.
Syntax:
public abstract class Index<T> : IReadOnlyCollection<T>, IEnumerable where T : IDataItem
Inheritance: objectIndex<T>
Derived Classes:
Implements:
Constructors
Initializes an index for the specified collection view.
public Index(RadCollectionView<T> collectionView)
The view whose source, filtering, sorting, and paging settings drive the index.
Properties
Gets the collection view that supplies this index's source and operation settings.
public RadCollectionView<T> CollectionView { get; }
Gets the number of items in the current indexed projection.
public int Count { get; }
Implements:
Items
IList<T>
Gets the items in the index's current projection.
public abstract IList<T> Items { get; }
Methods
Copies the indexed items into an array beginning at the specified destination index.
public void CopyTo(T[] array, int index)
The destination array.
indexintThe zero-based destination index.
Implements:
Enumerates the items in the current indexed projection.
public IEnumerator<T> GetEnumerator()
IEnumerator<T>
An enumerator over the indexed items.
Calculates the page number by dividing the item's current index by the view's page size.
public virtual int GetItemPageIndex(T item)
The item whose page is requested.
Returns:The zero-based page index calculated for the item.
Copies the requested page from the indexed item sequence.
public virtual IList<T> GetItemsOnPage(int pageIndex)
The zero-based page index.
Returns:IList<T>
A list containing the items in that page, up to the view's page size.
Finds the position of an item in the current indexed projection.
public int IndexOf(T value)
The item to locate.
Returns:The zero-based index, or -1 if the item is not present.
Implements:
Provides a hook for concrete indexes to replace their source sequence.
public virtual void Load(IEnumerable<T> source)
The sequence to load.
Rebuilds the indexed item sequence to reflect the associated view.
protected abstract void Perform()
Provides a hook for concrete indexes to adjust their cached version marker when a view is marked dirty.
protected virtual void SetDirty()