New to Telerik UI for WinFormsStart a free 30-day trial

Represents a specialized collection that stores and manages RadItem objects with support for ownership relationships, change notifications, and hierarchical item management.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

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

Inheritance: objectCollectionBaseRadItemCollection

Derived Classes: RadItemOwnerCollectionRadItemVirtualizationCollection

Implements: ICollectionIEnumerableIList

Inherited Members CollectionBase.Clear()CollectionBase.RemoveAt(int)CollectionBase.OnInsert(int, object)CollectionBase.InnerListCollectionBase.ListCollectionBase.CapacityCollectionBase.Count...

Constructors

Initializes a new instance of the RadItemCollectionBase class.

C#
public RadItemCollection()

Initializes a new instance of RadItemCollection containing any array of RadItem objects.

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

A array of RadItem objects with which to intialize the collection

Initializes a new instance of RadItemCollection based on another RadItemCollection.

C#
public RadItemCollection(RadItemCollection value)
Parameters:valueRadItemCollection

A RadItemCollection from which the contents are copied.

Properties

C#
public virtual Type DefaultType { get; set; }

Gets or sets an array of the excluded items' types for this collection.

C#
[Browsable(false)]
public virtual Type[] ExcludedTypes { get; set; }
C#
[Browsable(false)]
public RadItem First { get; }

Gets or sets an array of the items' types in the collection.

C#
public virtual Type[] ItemTypes { get; set; }
C#
[Browsable(false)]
public RadItem Last { get; }

Gets or sets an array of the sealed items' types for this collection. That are types that are allowed but not their descendants.

C#
[Browsable(false)]
public virtual Type[] SealedTypes { get; set; }

Represents the entry at the specified index of the RadItem.

C#
public virtual RadItem this[int index] { get; set; }
Parameters:indexint

The zero-based index of the entry to locate in the collection.

Property Value:

The entry at the specified index of the collection.

Exceptions:

ArgumentOutOfRangeException

index is outside the valid range of indexes for the collection.

Gets the first found item, with Name property equal to itemName specified, case-sensitive.

C#
public virtual RadItem this[string itemName] { get; }
Parameters:itemNamestring

item Name

Property Value:

RadItem if found, null (Nothing in VB.NET) otherwise

Methods

Adds a RadItem with the specified value to the Telerik.WinControls.RadItemCollection .

C#
public int Add(RadItem value)
Parameters:valueRadItem

The RadItem to add.

Returns:

int

The index at which the new element was inserted.

Copies the elements of an array to the end of the RadItemCollection.

C#
public void AddRange(params RadItem[] value)
Parameters:valueRadItem[]

An array of type RadItem containing the objects to add to the collection.

Adds the contents of another RadItemCollection to the end of the collection.

C#
public void AddRange(RadItemCollection value)
Parameters:valueRadItemCollection

A RadItemCollection containing the objects to add to the collection.

Gets a value indicating whether the RadItemCollection contains the specified RadItem.

C#
public bool Contains(RadItem value)
Parameters:valueRadItem

The RadItem to locate.

Returns:

bool

true if the RadItem is contained in the collection; otherwise, false.

Copies the RadItemCollection values to a one-dimensional Array instance at the specified index.

C#
public void CopyTo(RadItem[] array, int index)
Parameters:arrayRadItem[]

The one-dimensional Array that is the destination of the values copied from RadItemCollection .

indexint

The index in array where copying begins.

Exceptions:

ArgumentException

array is multidimensional.

-or-

The number of elements in the RadItemCollection is greater than the available space between index and the end of array.

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than array's lowbound.

Returns an enumerator that can iterate through the RadItemCollection .

C#
public RadItemCollection.RadItemEnumerator GetEnumerator()
Returns:

RadItemCollection.RadItemEnumerator

None.

Returns the index of a RadItem in the RadItemCollection .

C#
public int IndexOf(RadItem value)
Parameters:valueRadItem

The RadItem to locate.

Returns:

int

The index of the RadItem of value in the RadItemCollection, if found; otherwise, -1.

Inserts a RadItem into the RadItemCollection at the specified index.

C#
public void Insert(int index, RadItem value)
Parameters:indexint

The zero-based index where value should be inserted.

valueRadItem

The RadItem to insert.

C#
protected override void OnClear()

Overrides: CollectionBase.OnClear()

C#
protected override void OnClearComplete()

Overrides: CollectionBase.OnClearComplete()

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

Overrides: CollectionBase.OnInsertComplete(int, object)

C#
protected virtual void OnItemsChanged(RadItem target, ItemsChangeOperation operation)
Parameters:targetRadItemoperationItemsChangeOperation
C#
protected override void OnRemove(int index, object value)
Parameters:indexintvalueobject

Overrides: CollectionBase.OnRemove(int, object)

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

Overrides: CollectionBase.OnRemoveComplete(int, object)

C#
protected override void OnSet(int index, object oldValue, object newValue)
Parameters:indexintoldValueobjectnewValueobject

Overrides: CollectionBase.OnSet(int, object, object)

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

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

C#
protected virtual void OnSort()
C#
protected virtual void OnSortComplete()
C#
protected override void OnValidate(object value)
Parameters:valueobject

Overrides: CollectionBase.OnValidate(object)

Removes a specific RadItem from the RadItemCollection .

C#
public void Remove(RadItem value)
Parameters:valueRadItem

The RadItem to remove from the RadItemCollection .

Exceptions:

ArgumentException

value is not found in the Collection.

C#
public void ResumeNotifications()

Sorts the elements in the entire RadElementCollection using the IComparable implementation of each element.

C#
public void Sort()

Sorts the elements in the entire RadElementCollection using the specified comparer.

C#
public void Sort(IComparer comparer)
Parameters:comparerIComparer

The IComparer implementation to use when comparing elements.

Sorts the elements in a range of elements in RadElementCollection using the specified comparer.

C#
public void Sort(int index, int count, IComparer comparer)
Parameters:indexint

The zero-based starting index of the range to sort.

countint

The length of the range to sort.

comparerIComparer

The IComparer implementation to use when comparing elements.

C#
public void SuspendNotifications()

Retrieves an array of the items in the collection.

C#
public RadItem[] ToArray()
Returns:

RadItem[]

Events

Fires when item is changed.

C#
public event ItemChangedDelegate ItemsChanged