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 NotifyCollection<T>

Represents a collection that provides notifications when items are added, removed, or when the list is refreshed.

Inheritance
System.Object
System.Collections.ObjectModel.Collection<T>
NotifyCollection<T>
ItemNotifyCollection<T>
FilterDescriptorCollection
GroupDescriptorCollection
SortDescriptorCollection
EffectCollection
ObjectRelationCollecion
ChartDataPointCollection
GanttViewDataItemCollection
GanttViewLinkDataItemCollection
GridGroupByFieldCollection
GridViewRelationCollection
RadTreeNodeCollection
RelationBindingCollection
SparkDataPointCollection
Inherited Members
System.Collections.ObjectModel.Collection<T>.Add(T)
System.Collections.ObjectModel.Collection<T>.Clear()
System.Collections.ObjectModel.Collection<T>.CopyTo(T[], System.Int32)
System.Collections.ObjectModel.Collection<T>.Contains(T)
System.Collections.ObjectModel.Collection<T>.GetEnumerator()
System.Collections.ObjectModel.Collection<T>.IndexOf(T)
System.Collections.ObjectModel.Collection<T>.Insert(System.Int32, T)
System.Collections.ObjectModel.Collection<T>.Remove(T)
System.Collections.ObjectModel.Collection<T>.RemoveAt(System.Int32)
System.Collections.ObjectModel.Collection<T>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.Collection<T>.Count
System.Collections.ObjectModel.Collection<T>.Items
System.Collections.ObjectModel.Collection<T>.Item[System.Int32]
System.Collections.ObjectModel.Collection<T>.System.Collections.Generic.ICollection<T>.IsReadOnly
System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Item[System.Int32]
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IsFixedSize
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.Collections.Generic
Assembly: Telerik.WinControls.dll

Syntax

public class NotifyCollection<T> : Collection<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 collection supports batch updates through BeginUpdate/EndUpdate methods, move operations, and range operations while providing change notifications and property change notifications.

Constructors

NotifyCollection()

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

Declaration
public NotifyCollection()

NotifyCollection(IList<T>)

Initializes a new instance of the NotifyCollection<T> class with the specified list.

Declaration
public NotifyCollection(IList<T> list)
Parameters
System.Collections.Generic.IList<T> list

The list to wrap as a NotifyCollection.

Fields

Empty

Declaration
public static NotifyCollection<T> Empty
Field Value
NotifyCollection<T>

Properties

Suspended

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

Version

Declaration
protected int Version { get; }
Property Value
System.Int32

Methods

AddRange(T[])

Adds multiple items to the collection in a batch operation.

Declaration
public void AddRange(params T[] items)
Parameters
T[] items

The items to add to the collection.

Remarks

This method uses BeginUpdate/EndUpdate to perform a batch operation with a single notification.

AddRange(IEnumerable<T>)

Adds multiple items to the collection in a batch operation.

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

The enumerable collection of items to add.

Remarks

This method uses BeginUpdate/EndUpdate to perform a batch operation with a single notification.

BeginUpdate()

Suspends change notifications until EndUpdate is called.

Declaration
public void BeginUpdate()
Remarks

Use this method to perform multiple operations without triggering notifications for each change. Always pair with EndUpdate to resume notifications.

ClearItems()

Declaration
protected override void ClearItems()
Overrides
System.Collections.ObjectModel.Collection<T>.ClearItems()

CreateEventArguments(NotifyCollectionChangedAction)

Declaration
protected virtual NotifyCollectionChangedEventArgs CreateEventArguments(NotifyCollectionChangedAction action)
Parameters
NotifyCollectionChangedAction action

Returns
NotifyCollectionChangedEventArgs

CreateEventArguments(NotifyCollectionChangedAction, Object, Int32)

Declaration
protected virtual NotifyCollectionChangedEventArgs CreateEventArguments(NotifyCollectionChangedAction action, object item, int index)
Parameters
NotifyCollectionChangedAction action

System.Object item

System.Int32 index

Returns
NotifyCollectionChangedEventArgs

CreateEventArguments(NotifyCollectionChangedAction, Object, Object, Int32)

Declaration
protected virtual NotifyCollectionChangedEventArgs CreateEventArguments(NotifyCollectionChangedAction action, object oldItem, object item, int index)
Parameters
NotifyCollectionChangedAction action

System.Object oldItem

System.Object item

System.Int32 index

Returns
NotifyCollectionChangedEventArgs

DeferRefresh()

Defers the refresh.

Declaration
public virtual IDisposable DeferRefresh()
Returns
System.IDisposable

EndUpdate()

Resumes change notifications and fires any pending notifications.

Declaration
public void EndUpdate()

EndUpdate(Boolean)

Declaration
public virtual void EndUpdate(bool notify)
Parameters
System.Boolean notify

InsertItem(Int32, T)

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

T item

Overrides
System.Collections.ObjectModel.Collection<T>.InsertItem(System.Int32, T)

Move(Int32, Int32)

Moves an item from one index to another.

Declaration
public void Move(int oldIndex, int newIndex)
Parameters
System.Int32 oldIndex

The current index of the item.

System.Int32 newIndex

The target index for the item.

MoveItem(Int32, Int32)

Declaration
protected virtual void MoveItem(int oldIndex, int newIndex)
Parameters
System.Int32 oldIndex

System.Int32 newIndex

OnCollectionChanged(NotifyCollectionChangedEventArgs)

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

OnPropertyChanged(PropertyChangedEventArgs)

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

OnPropertyChanged(String)

Declaration
protected void OnPropertyChanged(string propertyName)
Parameters
System.String propertyName

RemoveItem(Int32)

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

Overrides
System.Collections.ObjectModel.Collection<T>.RemoveItem(System.Int32)

SetItem(Int32, T)

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

T item

Overrides
System.Collections.ObjectModel.Collection<T>.SetItem(System.Int32, T)

Events

CollectionChanged

Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
NotifyCollectionChangedEventHandler

Implements
INotifyCollectionChanged.CollectionChanged

PropertyChanged

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

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.