Class
RadItemCollection

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:

cs-api-definition
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

RadItemCollection()

Initializes a new instance of the RadItemCollectionBase class.

Declaration

cs-api-definition
public RadItemCollection()

RadItemCollection(RadItemCollection)

Initializes a new instance of RadItemCollection based on another RadItemCollection.

Declaration

cs-api-definition
public RadItemCollection(RadItemCollection value)

Parameters

value

RadItemCollection

A RadItemCollection from which the contents are copied.

RadItemCollection(RadItem[])

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

Declaration

cs-api-definition
public RadItemCollection(RadItem[] value)

Parameters

value

RadItem[]

A array of RadItem objects with which to intialize the collection

Properties

DefaultType

Declaration

cs-api-definition
public virtual Type DefaultType { get; set; }

Property Value

Type

ExcludedTypes

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

Declaration

cs-api-definition
[Browsable(false)]
public virtual Type[] ExcludedTypes { get; set; }

Property Value

Type[]

First

Declaration

cs-api-definition
[Browsable(false)]
public RadItem First { get; }

Property Value

RadItem

ItemTypes

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

Declaration

cs-api-definition
public virtual Type[] ItemTypes { get; set; }

Property Value

Type[]

Last

Declaration

cs-api-definition
[Browsable(false)]
public RadItem Last { get; }

Property Value

RadItem

SealedTypes

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

Declaration

cs-api-definition
[Browsable(false)]
public virtual Type[] SealedTypes { get; set; }

Property Value

Type[]

this[int]

Represents the entry at the specified index of the RadItem.

Declaration

cs-api-definition
public virtual RadItem this[int index] { get; set; }

Parameters

index

int

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

Property Value

RadItem

The entry at the specified index of the collection.

Exceptions

ArgumentOutOfRangeException

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

this[string]

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

Declaration

cs-api-definition
public virtual RadItem this[string itemName] { get; }

Parameters

itemName

string

item Name

Property Value

RadItem

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

Methods

Add(RadItem)

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

Declaration

cs-api-definition
public int Add(RadItem value)

Parameters

value

RadItem

The RadItem to add.

Returns

int

The index at which the new element was inserted.

AddRange(RadItemCollection)

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

Declaration

cs-api-definition
public void AddRange(RadItemCollection value)

Parameters

value

RadItemCollection

A RadItemCollection containing the objects to add to the collection.

AddRange(params RadItem[])

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

Declaration

cs-api-definition
public void AddRange(params RadItem[] value)

Parameters

value

RadItem[]

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

Contains(RadItem)

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

Declaration

cs-api-definition
public bool Contains(RadItem value)

Parameters

value

RadItem

The RadItem to locate.

Returns

bool

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

CopyTo(RadItem[], int)

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

Declaration

cs-api-definition
public void CopyTo(RadItem[] array, int index)

Parameters

array

RadItem[]

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

index

int

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.

GetEnumerator()

Returns an enumerator that can iterate through the RadItemCollection .

Declaration

cs-api-definition
public RadItemCollection.RadItemEnumerator GetEnumerator()

Returns

RadItemCollection.RadItemEnumerator

None.

IndexOf(RadItem)

Returns the index of a RadItem in the RadItemCollection .

Declaration

cs-api-definition
public int IndexOf(RadItem value)

Parameters

value

RadItem

The RadItem to locate.

Returns

int

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

Insert(int, RadItem)

Inserts a RadItem into the RadItemCollection at the specified index.

Declaration

cs-api-definition
public void Insert(int index, RadItem value)

Parameters

index

int

The zero-based index where value should be inserted.

value

RadItem

The RadItem to insert.

OnClear()

Declaration

cs-api-definition
protected override void OnClear()

Overrides CollectionBase.OnClear()

OnClearComplete()

Declaration

cs-api-definition
protected override void OnClearComplete()

Overrides CollectionBase.OnClearComplete()

OnInsertComplete(int, object)

Declaration

cs-api-definition
protected override void OnInsertComplete(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnInsertComplete(int, object)

OnItemsChanged(RadItem, ItemsChangeOperation)

Declaration

cs-api-definition
protected virtual void OnItemsChanged(RadItem target, ItemsChangeOperation operation)

Parameters

target

RadItem

operation

ItemsChangeOperation

OnRemove(int, object)

Declaration

cs-api-definition
protected override void OnRemove(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnRemove(int, object)

OnRemoveComplete(int, object)

Declaration

cs-api-definition
protected override void OnRemoveComplete(int index, object value)

Parameters

index

int

value

object

Overrides CollectionBase.OnRemoveComplete(int, object)

OnSet(int, object, object)

Declaration

cs-api-definition
protected override void OnSet(int index, object oldValue, object newValue)

Parameters

index

int

oldValue

object

newValue

object

Overrides CollectionBase.OnSet(int, object, object)

OnSetComplete(int, object, object)

Declaration

cs-api-definition
protected override void OnSetComplete(int index, object oldValue, object newValue)

Parameters

index

int

oldValue

object

newValue

object

Overrides CollectionBase.OnSetComplete(int, object, object)

OnSort()

Declaration

cs-api-definition
protected virtual void OnSort()

OnSortComplete()

Declaration

cs-api-definition
protected virtual void OnSortComplete()

OnValidate(object)

Declaration

cs-api-definition
protected override void OnValidate(object value)

Parameters

value

object

Overrides CollectionBase.OnValidate(object)

Remove(RadItem)

Removes a specific RadItem from the RadItemCollection .

Declaration

cs-api-definition
public void Remove(RadItem value)

Parameters

value

RadItem

The RadItem to remove from the RadItemCollection .

Exceptions

ArgumentException

value is not found in the Collection.

ResumeNotifications()

Declaration

cs-api-definition
public void ResumeNotifications()

Sort()

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

Declaration

cs-api-definition
public void Sort()

Sort(IComparer)

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

Declaration

cs-api-definition
public void Sort(IComparer comparer)

Parameters

comparer

IComparer

The IComparer implementation to use when comparing elements.

Sort(int, int, IComparer)

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

Declaration

cs-api-definition
public void Sort(int index, int count, IComparer comparer)

Parameters

index

int

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

count

int

The length of the range to sort.

comparer

IComparer

The IComparer implementation to use when comparing elements.

SuspendNotifications()

Declaration

cs-api-definition
public void SuspendNotifications()

ToArray()

Retrieves an array of the items in the collection.

Declaration

cs-api-definition
public RadItem[] ToArray()

Returns

RadItem[]

Events

ItemsChanged

Fires when item is changed.

Declaration

cs-api-definition
public event ItemChangedDelegate ItemsChanged

Event Value

ItemChangedDelegate