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

A specialized collection for RadItem objects that supports virtualization for performance optimization in large datasets.

This collection integrates with IVirtualViewport to provide virtualization capabilities, allowing UI controls to efficiently handle large numbers of items by only creating visual elements for items currently in view. The collection automatically notifies the viewport about data changes to maintain virtualization state.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class RadItemVirtualizationCollection : RadItemCollection, IList, ICollection, IEnumerable, IVirtualizationCollection

Inheritance: objectCollectionBaseRadItemCollectionRadItemVirtualizationCollection

Implements: ICollectionIEnumerableIListIVirtualizationCollection

Inherited Members RadItemCollection.OnItemsChanged(RadItem, ItemsChangeOperation)RadItemCollection.OnValidate(object)RadItemCollection.SuspendNotifications()RadItemCollection.ResumeNotifications()RadItemCollection.GetEnumerator()RadItemCollection.OnRemove(int, object)RadItemCollection.OnSet(int, object, object)RadItemCollection.Add(RadItem)RadItemCollection.AddRange(params RadItem[])RadItemCollection.AddRange(RadItemCollection)RadItemCollection.Insert(int, RadItem)RadItemCollection.Remove(RadItem)RadItemCollection.Sort()RadItemCollection.Sort(IComparer)RadItemCollection.Sort(int, int, IComparer)RadItemCollection.Contains(RadItem)RadItemCollection.IndexOf(RadItem)RadItemCollection.CopyTo(RadItem[], int)RadItemCollection.ToArray()RadItemCollection.ItemTypesRadItemCollection.ExcludedTypesRadItemCollection.SealedTypesRadItemCollection.DefaultTypeRadItemCollection.this[int]RadItemCollection.FirstRadItemCollection.LastRadItemCollection.this[string]RadItemCollection.ItemsChangedCollectionBase.Clear()CollectionBase.RemoveAt(int)CollectionBase.OnInsert(int, object)CollectionBase.InnerListCollectionBase.ListCollectionBase.CapacityCollectionBase.Count...

Constructors

Initializes a new instance of the RadItemVirtualizationCollection class.

C#
public RadItemVirtualizationCollection()

Initializes a new instance of the RadItemVirtualizationCollection class with the specified viewport.

C#
public RadItemVirtualizationCollection(IVirtualViewport ownerViewport)
Parameters:ownerViewportIVirtualViewport

The virtual viewport that will manage virtualization for this collection.

Properties

Gets or sets the virtual viewport that manages the virtualization behavior for this collection.

C#
[Browsable(false)]
public IVirtualViewport OwnerViewport { get; set; }
Property Value:

The IVirtualViewport instance that handles virtualization operations.

The viewport is responsible for determining which items are visible and need to be realized, and manages the virtualization lifecycle for performance optimization.

Methods

Gets the virtual data at the specified index.

C#
public object GetVirtualData(int index)
Parameters:indexint

The zero-based index of the data to retrieve.

Returns:

object

The data at the specified index, or null if the index is out of range.

Implements: IVirtualizationCollection.GetVirtualData(int)

Determines the index of a specific data item in the collection.

C#
public int IndexOf(object data)
Parameters:dataobject

The data item to locate in the collection.

Returns:

int

The zero-based index of the item if found; otherwise, -1.

Implements: IVirtualizationCollection.IndexOf(object)

Raises the clearing notification before the collection is emptied, unless notifications are suspended.

C#
protected override void OnClear()

Overrides: RadItemCollection.OnClear()

Raises the cleared notification after the collection has been emptied, unless notifications are suspended.

C#
protected override void OnClearComplete()

Overrides: RadItemCollection.OnClearComplete()

Raises the completed-insertion notification after an item has been added, unless notifications are suspended.

C#
protected override void OnInsertComplete(int index, object value)
Parameters:indexint

The index where the item was inserted.

valueobject

The inserted item.

Overrides: RadItemCollection.OnInsertComplete(int, object)

Raises the removed notification after an item has been removed, unless notifications are suspended.

C#
protected override void OnRemoveComplete(int index, object value)
Parameters:indexint

The former index of the item.

valueobject

The removed item.

Overrides: RadItemCollection.OnRemoveComplete(int, object)

Raises the set notification after an item has been replaced, unless notifications are suspended.

C#
protected override void OnSetComplete(int index, object oldValue, object newValue)
Parameters:indexint

The index that was updated.

oldValueobject

The item previously at the index.

newValueobject

The replacement item now at the index.

Overrides: RadItemCollection.OnSetComplete(int, object, object)

Raises the sorting notification before Sort() reorders the items, unless notifications are suspended.

C#
protected override void OnSort()

Overrides: RadItemCollection.OnSort()

Raises the sorted notification after Sort() reorders the items, unless notifications are suspended.

C#
protected override void OnSortComplete()

Overrides: RadItemCollection.OnSortComplete()