skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadObservableCollection<T>

Represents an System.Collections.ObjectModel.ObservableCollection<> that has ability to suspend change notification events.

Inheritance
System.Object
RadObservableCollection<T>
AnnotationCollection
ChartLegendItemCollection
LabelLayersDataCollection
MaterialsCollection
RadHierarchicalObservableCollection<T>
StripLine3DDataItemCollection
StylesPalette
IndicatorValueMappingCollection
AggregateResultCollection
ObservableItemCollection<T>
TableDefinitionCollection
Namespace: Telerik.Windows.Data
Assembly: Telerik.Windows.Data.dll

Syntax

public class RadObservableCollection<T> : ObservableCollection<T>, ISuspendNotifications, INotifyCollectionStateProvider
Type Parameters
T

The type of the items in the collection.

Constructors

RadObservableCollection()

Initializes a new instance of the RadObservableCollection<T> class.

Declaration
public RadObservableCollection()

RadObservableCollection(IEnumerable<T>)

Initializes a new instance of the RadObservableCollection<T> class.

Declaration
public RadObservableCollection(IEnumerable<T> collection)
Parameters
System.Collections.Generic.IEnumerable<T> collection

The collection from which the elements are copied.

Exceptions
System.ArgumentNullException

The collection parameter cannot be null.

Properties

AddedItems

Gets the added items between suspend and resume.

Declaration
protected virtual IList<T> AddedItems { get; }
Property Value
System.Collections.Generic.IList<T>

The added items.

IsDirty

Gets or sets a value indicating whether change to the collection is made when its notifications are suspended.

Declaration
protected bool IsDirty { get; set; }
Property Value
System.Boolean

true if this instance is has been changed while notifications are suspended; otherwise, false.

NotificationsSuspended

Gets a value indicating whether change notifications are suspended.

Declaration
public bool NotificationsSuspended { get; }
Property Value
System.Boolean

True if notifications are suspended, otherwise, false.

Implements
ISuspendNotifications.NotificationsSuspended

RemovedItems

Gets the removed items between suspend and resume.

Declaration
protected virtual IList<T> RemovedItems { get; }
Property Value
System.Collections.Generic.IList<T>

The removed items.

ShouldResetOnResumeNotifications

Get a value that indicates whether RadObservableCollection would raise CollectionChanged event with Reset action, when a bulk add/remove operation takes place.

Declaration
public bool ShouldResetOnResumeNotifications { get; }
Property Value
System.Boolean

Methods

AddRange(IEnumerable<T>)

Adds the elements of the specified collection to the end of the System.Collections.ObjectModel.ObservableCollection<>.

Declaration
public virtual void AddRange(IEnumerable<T> items)
Parameters
System.Collections.Generic.IEnumerable<T> items

The items that will be added.

Exceptions
System.ArgumentNullException

items is null.

ClearItems()

Declaration
protected override void ClearItems()

InsertItem(Int32, T)

Declaration
protected override void InsertItem(int index, T item)
Parameters
System.Int32 index

T item

InsertRange(IEnumerable<T>, Int32)

Inserts the elements of the specified collection at the specified index.

Declaration
public virtual void InsertRange(IEnumerable<T> items, int index)
Parameters
System.Collections.Generic.IEnumerable<T> items

The items that will be added.

System.Int32 index

The start index.

Exceptions
System.ArgumentNullException

items is null.

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Declaration
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameters
System.Collections.Specialized.NotifyCollectionChangedEventArgs e

Remarks

Raises the System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged event when notifications are not suspended.

OnCollectionChanging(CollectionChangingEventArgs)

Raises the CollectionChanging event.

Declaration
protected virtual void OnCollectionChanging(CollectionChangingEventArgs e)
Parameters
CollectionChangingEventArgs e

The CollectionChangingEventArgs instance containing the event data.

OnPropertyChanged(PropertyChangedEventArgs)

Declaration
protected override void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs e

Remarks

Raises the System.ComponentModel.INotifyPropertyChanged.PropertyChanged event when notifications are not suspended.

RaiseCollectionChangedOnResume()

Raises the CollectionChanged in accordance to the value of ShouldResetOnResumeNotifications and the presence of modified items.

Declaration
protected virtual void RaiseCollectionChangedOnResume()

RemoveItem(Int32)

Declaration
protected override void RemoveItem(int index)
Parameters
System.Int32 index

RemoveRange(IEnumerable<T>)

Removes the elements from the specified collection.

Declaration
public virtual void RemoveRange(IEnumerable<T> items)
Parameters
System.Collections.Generic.IEnumerable<T> items

The items that will be removed.

Exceptions
System.ArgumentNullException

items is null.

Reset()

Raises System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged with System.Collections.Specialized.NotifyCollectionChangedAction.Reset changed action.

Declaration
public void Reset()

ResumeNotifications()

Resumes the notifications.

Declaration
public virtual void ResumeNotifications()
Implements
ISuspendNotifications.ResumeNotifications()

SuspendNotifications()

Suspends the notifications.

Declaration
public virtual void SuspendNotifications()
Implements
ISuspendNotifications.SuspendNotifications()

Events

CollectionChanging

Occurs when collection is changing.

Declaration
public event EventHandler<CollectionChangingEventArgs> CollectionChanging
Event Type
System.EventHandler<CollectionChangingEventArgs>

PropertyChanged

Occurs when a property value changes.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.