Skip to main content
.NET 8.0+

XPBaseCollection.ResumeChangedEvents() Method

Resumes the immediate update of the collection after it was suspended using the XPBaseCollection.SuspendChangedEvents method.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public void ResumeChangedEvents()

Remarks

Each time the collection is changed (e.g., a new object has been added), the XPBaseCollection.CollectionChanged event is raised. This forces a control to which the collection is bound to repaint itself. This may slow down the application’s performance or result in flickering when performing several changes. To avoid this, the code performing multiple changes must be enclosed within the XPBaseCollection.SuspendChangedEvents and ResumeChangedEvents method calls.

The XPBaseCollection.SuspendChangedEvents method prevents the XPBaseCollection.CollectionChanged event from firing and suppresses automatic updates of the object list and the XPBaseCollection.Count value when the collection filter or sorting is changed until the ResumeChangedEvents method is called. Any changes made after a call to the XPBaseCollection.SuspendChangedEvents method will not force the bound control to update itself. The ResumeChangedEvents method raises the XPBaseCollection.CollectionChanged event, so that the bound control can redraw itself. Any further changes are applied immediately.

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

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