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

A collection that stores RadItem objects and manages their ownership relationships with a parent RadElement.

This collection automatically synchronizes items with the owner's children collection, ensuring that items added to this collection are also properly parented to the owner element. It handles owner change scenarios and maintains consistency between the collection and element hierarchy.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class RadItemOwnerCollection : RadItemCollection, IList, ICollection, IEnumerable

Inheritance: objectCollectionBaseRadItemCollectionRadItemOwnerCollection

Derived Classes: DataFilterItemOwnerCollectionGridGroupHeaderListsCollectionRadItemOwnerGenericCollection<T>RadRibbonBarCommandTabCollection

Implements: ICollectionIEnumerableIList

Inherited Members RadItemCollection.OnValidate(object)RadItemCollection.SuspendNotifications()RadItemCollection.ResumeNotifications()RadItemCollection.GetEnumerator()RadItemCollection.OnRemove(int, object)RadItemCollection.OnSet(int, object, object)RadItemCollection.OnClearComplete()RadItemCollection.OnSort()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 RadItemOwnerCollection class.

C#
public RadItemOwnerCollection()

Initializes a new instance of the RadItemOwnerCollection class with the specified owner.

C#
public RadItemOwnerCollection(RadElement owner)
Parameters:ownerRadElement

The RadElement that will own items in this collection.

Initializes a new instance of the RadItemOwnerCollection class containing an array of RadItem objects.

C#
public RadItemOwnerCollection(RadItem[] value)
Parameters:valueRadItem[]

An array of RadItem objects with which to initialize the collection.

Initializes a new instance of the RadItemOwnerCollection class based on another collection.

C#
public RadItemOwnerCollection(RadItemOwnerCollection value)
Parameters:valueRadItemOwnerCollection

A RadItemOwnerCollection from which the contents are copied.

Properties

Gets or sets the owner of the collection.

C#
public RadElement Owner { get; set; }
Property Value:

The RadElement that owns items in this collection.

When the owner changes, the collection automatically removes all items from the previous owner's children collection and adds them to the new owner's children collection to maintain consistency.

Methods

Removes the collection's items from the owner's child collection before clearing.

C#
protected override void OnClear()

Overrides: RadItemCollection.OnClear()

Adds a newly inserted item to the owner's child collection when it is not already parented there.

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)

Updates owner-collection references for inserted, replaced, and removed items, then raises notifications unless the owner is disposing or disposed, or notifications are suspended.

C#
protected override void OnItemsChanged(RadItem target, ItemsChangeOperation operation)
Parameters:targetRadItem

The item associated with the operation, or null for collection-wide operations.

operationItemsChangeOperation

The collection operation being reported.

Overrides: RadItemCollection.OnItemsChanged(RadItem, ItemsChangeOperation)

Removes the item from the owner's child collection after it leaves this collection.

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)

Synchronizes the replacement item with the owner's child collection after a set operation.

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.

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

Notifies the owner that sorting has completed.

C#
protected override void OnSortComplete()

Overrides: RadItemCollection.OnSortComplete()