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

Tracks a list element's selected items and synchronizes their Selected and Active states. Replacing an entry directly is not supported.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class RadListDataItemSelectedCollection : ObservableCollection<RadListDataItem>, IList, ICollection, INotifyCollectionChanged, INotifyCollectionChanging, INotifyPropertyChanged, INotifyPropertyChangingEx, IReadOnlyCollection<RadListDataItem>, IEnumerable

Inheritance: objectCollection<RadListDataItem>ObservableCollection<RadListDataItem>RadListDataItemSelectedCollection

Implements: ICollectionIEnumerableIListINotifyCollectionChangedINotifyCollectionChangingINotifyPropertyChangedINotifyPropertyChangingExIReadOnlyCollection<RadListDataItem>...

Inherited Members ObservableCollection<RadListDataItem>.CountStringObservableCollection<RadListDataItem>.ItemArrayStringObservableCollection<RadListDataItem>.InsertItem(int, RadListDataItem, Action<RadListDataItem>)ObservableCollection<RadListDataItem>.Move(int, int)ObservableCollection<RadListDataItem>.MoveItem(int, int)ObservableCollection<RadListDataItem>.BeginUpdate()ObservableCollection<RadListDataItem>.BeginItemUpdate()ObservableCollection<RadListDataItem>.EndItemUpdate()ObservableCollection<RadListDataItem>.EndItemUpdate(bool)ObservableCollection<RadListDataItem>.EndUpdate(bool)ObservableCollection<RadListDataItem>.EndUpdate()ObservableCollection<RadListDataItem>.OnCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<RadListDataItem>.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<RadListDataItem>.CallCollectionChanged(object, NotifyCollectionChangedEventArgs)ObservableCollection<RadListDataItem>.OnCollectionChanging(NotifyCollectionChangingEventArgs)ObservableCollection<RadListDataItem>.NotifyListenersCollectionChanging(NotifyCollectionChangingEventArgs)ObservableCollection<RadListDataItem>.CallCollectionChanging(object, NotifyCollectionChangingEventArgs)ObservableCollection<RadListDataItem>.AddRange(IEnumerable<RadListDataItem>)ObservableCollection<RadListDataItem>.RemoveRange(IEnumerable<RadListDataItem>)ObservableCollection<RadListDataItem>.OnCollectionChanged(NotifyCollectionChangedAction, object, int)ObservableCollection<RadListDataItem>.OnCollectionChanged(NotifyCollectionChangedAction, object, int, int)ObservableCollection<RadListDataItem>.OnCollectionChanged(NotifyCollectionChangedAction, object, object, int)ObservableCollection<RadListDataItem>.OnCollectionReset(IList)ObservableCollection<RadListDataItem>.OnCollectionChanging(NotifyCollectionChangedAction, object, int)ObservableCollection<RadListDataItem>.OnCollectionChanging(NotifyCollectionChangedAction, object, int, int)ObservableCollection<RadListDataItem>.OnCollectionChanging(NotifyCollectionChangedAction, object, object, int)ObservableCollection<RadListDataItem>.OnCollectionReseting()ObservableCollection<RadListDataItem>.OnNotifyPropertyChanged(string)ObservableCollection<RadListDataItem>.OnNotifyPropertyChanged(PropertyChangedEventArgs)ObservableCollection<RadListDataItem>.OnNotifyPropertyChanging(string)ObservableCollection<RadListDataItem>.OnNotifyPropertyChanging(PropertyChangingEventArgsEx)ObservableCollection<RadListDataItem>.IsUpdatedObservableCollection<RadListDataItem>.CollectionChangedObservableCollection<RadListDataItem>.CollectionChangingObservableCollection<RadListDataItem>.PropertyChangedObservableCollection<RadListDataItem>.PropertyChangingCollection<RadListDataItem>.Add(RadListDataItem)Collection<RadListDataItem>.Clear()Collection<RadListDataItem>.CopyTo(RadListDataItem[], int)Collection<RadListDataItem>.Contains(RadListDataItem)Collection<RadListDataItem>.GetEnumerator()Collection<RadListDataItem>.IndexOf(RadListDataItem)Collection<RadListDataItem>.Insert(int, RadListDataItem)Collection<RadListDataItem>.Remove(RadListDataItem)Collection<RadListDataItem>.RemoveAt(int)Collection<RadListDataItem>.CountCollection<RadListDataItem>.ItemsCollection<RadListDataItem>.this[int]...

Constructors

Initializes the selection collection for the specified list element.

C#
public RadListDataItemSelectedCollection(RadListElement owner)
Parameters:ownerRadListElement

The list element whose selected items this collection tracks.

Exceptions: ArgumentException

owner is null.

Properties

Gets whether the collection is currently processing a clear and suppressing recursive clears.

C#
public bool Clearing { get; }

Gets whether the collection is currently processing an insertion and suppressing recursive insertions.

C#
public bool Inserting { get; }

Gets whether the collection is currently processing a removal and suppressing recursive removals.

C#
public bool Removing { get; }

Methods

Clears the collection and resets selected and active state on items that still belong to a list. Recursive clearing during removal or clearing is ignored.

C#
protected override void ClearItems()

Overrides: ObservableCollection<RadListDataItem>.ClearItems()

Adds an item and marks it selected and active. Insertion is ignored while another insertion is in progress.

C#
protected override void InsertItem(int index, RadListDataItem item)
Parameters:indexint

The insertion index.

itemRadListDataItem

The item to select.

Exceptions: InvalidOperationException

The owning list has None.

Overrides: ObservableCollection<RadListDataItem>.InsertItem(int, RadListDataItem)

If None causes this method to throw, the current implementation leaves Inserting set to true, so later insertion attempts are ignored.

Removes an item and clears its selected and active states when it still belongs to a list. Recursive removal during removal or clearing is ignored.

C#
protected override void RemoveItem(int index)
Parameters:indexint

The index of the selected item to remove.

Overrides: ObservableCollection<RadListDataItem>.RemoveItem(int)

Replacing an entry is unsupported because selection state is synchronized through insertion and removal.

C#
protected override void SetItem(int index, RadListDataItem item)
Parameters:indexint

The index of the entry to replace.

itemRadListDataItem

The replacement item.

Exceptions: InvalidOperationException

This collection does not support replacing entries.

Overrides: ObservableCollection<RadListDataItem>.SetItem(int, RadListDataItem)