skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact 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 Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free 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 ReadOnlyObservableCollection<T>

Represents a read-only wrapper around an ObservableCollection that provides change notifications.

Inheritance
System.Object
System.Collections.ObjectModel.ReadOnlyCollection<T>
ReadOnlyObservableCollection<T>
GridViewSelectedCellsCollection
GridViewSelectedRowsCollection
FieldCollection
Inherited Members
System.Collections.ObjectModel.ReadOnlyCollection<T>.Contains(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.CopyTo(T[], System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.GetEnumerator()
System.Collections.ObjectModel.ReadOnlyCollection<T>.IndexOf(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.get_Item(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.set_Item(System.Int32, T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.Add(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.Clear()
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.Insert(System.Int32, T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.Remove(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.RemoveAt(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Clear()
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.RemoveAt(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.Count
System.Collections.ObjectModel.ReadOnlyCollection<T>.Item[System.Int32]
System.Collections.ObjectModel.ReadOnlyCollection<T>.Items
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.IsReadOnly
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.Item[System.Int32]
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.IsFixedSize
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Item[System.Int32]
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Data
Assembly: Telerik.WinControls.dll

Syntax

public class ReadOnlyObservableCollection<T> : ReadOnlyCollection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Type Parameters
T

The type of elements in the collection.

Remarks

This class provides a read-only view of an observable collection while forwarding all change notifications from the underlying collection. It prevents modification while maintaining observability.

Constructors

ReadOnlyObservableCollection(ObservableCollection<T>)

Initializes a new instance of the ReadOnlyObservableCollection<T> class with the specified observable collection.

Declaration
public ReadOnlyObservableCollection(ObservableCollection<T> list)
Parameters
ObservableCollection<T> list

The ObservableCollection to wrap as read-only.

Methods

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Fires the CollectionChanged event when the underlying collection changes.

Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs args

The event arguments describing the collection change.

OnPropertyChanged(PropertyChangedEventArgs)

Fires the PropertyChanged event when a property of the underlying collection changes.

Declaration
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
Parameters
System.ComponentModel.PropertyChangedEventArgs args

The event arguments describing the property change.

Events

CollectionChanged

Occurs when an item is added, removed, changed, moved, or the entire list is refreshed.

Declaration
protected event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
NotifyCollectionChangedEventHandler

PropertyChanged

Occurs when when a property of an object changes change. Calling the event is developer's responsibility.

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

Explicit Interface Implementations

INotifyCollectionChanged.CollectionChanged

Occurs when an item is added, removed, changed, moved, or the entire list is refreshed.

Declaration
event NotifyCollectionChangedEventHandler INotifyCollectionChanged.CollectionChanged
Returns
NotifyCollectionChangedEventHandler

Implements
INotifyCollectionChanged.CollectionChanged

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • 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.