Skip to main content

CollectionSourceBase.CollectionChanged Event

Occurs after the Collection Source’s collection has been recreated.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v25.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public event EventHandler CollectionChanged

Event Data

The CollectionChanged event's data class is EventArgs.

Remarks

Handle this event to access a Collection Source’s collection in a View Controller. Subscribe to this event and perform your code in the event handler. Do not perform the collection-dependent code after the Controller has been activated. This is so, because while View Controllers are activating for a List View, the List View’s CollectionSourceBase.Collection property may return null.

This event is raised by the CollectionSourceBase.ResetCollection method, if the recreated collection differs from the previously existing one.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CollectionChanged event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also