New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Provides a state-managed generic collection base for RadMultiSelect related item collections. Handles view state tracking for contained items that implement IMarkableStateManager. Use this as a foundation for strongly-typed collections (e.g. MultiSelectItemCollection) that need:

  • ASP.NET ViewState persistence
  • Dirty-state propagation (so only changed items re-serialize)
  • Familiar IList-like operations (Add / Insert / Remove / Contains / IndexOf)

Search phrases: "RadMultiSelect custom collection", "state managed collection items", "track item viewstate".

Definition

Constructors

C#
public BaseCollection()
C#
public BaseCollection(RadMultiSelect owner)
Parameters:ownerRadMultiSelect

Properties

C#
public RadMultiSelect Owner { get; }

Gets or sets the at the specified index.

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

The zero-based index of the item to get or set.

Property Value:

The item at the specified index.

Methods

Append a single item to the end of the collection. Example:

csharp
items.Add(new MultiSelectItem("Text","Value"));
C#
public virtual void Add(T entity)
Parameters:entityT

Item to add (must not be null).

Append a sequence of items efficiently (avoids repeated caller loops). Example: collection.AddRange(sourceList);

C#
public virtual void AddRange(IEnumerable<T> entities)
Parameters:entitiesIEnumerable<T>

Enumerable of items to add.

C#
protected virtual bool Contains(T item)
Parameters:itemTReturns:

bool

C#
public IEnumerator<T> GetEnumerator()
Returns:

IEnumerator<T>

Implements: IEnumerable<T>.GetEnumerator()

C#
protected virtual int IndexOf(T item)
Parameters:itemTReturns:

int

C#
protected virtual void Insert(int index, T item)
Parameters:indexintitemT
C#
protected virtual void Remove(T item)
Parameters:itemT
C#
protected override void SetDirtyObject(object o)
Parameters:oobject

Overrides: StateManagedCollection.SetDirtyObject(object)