Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IObjectSpace.ObjectReloaded Event

Occurs after an object is reloaded from the database.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

#Event Data

The ObjectReloaded event's data class is ObjectManipulatingEventArgs. The following properties provide information specific to this event:

Property Description
Object Provides access to the object that is being manipulated.

#Remarks

In the BaseObjectSpace descendant, invoke the BaseObjectSpace.OnObjectReloaded method to raise the ObjectReloaded event.

The following code reloads the parent Detail View when one of the child objects is reloaded.

using DevExpress.ExpressApp;
using YourSolutionName.Module.BusinessObjects;

namespace YourSolutionName.Module.Controllers {
    public class MyViewController : ObjectViewController<DetailView, Parent> {
        protected override void OnActivated() {
            base.OnActivated();
            ObjectSpace.ObjectReloaded += ObjectSpace_ObjectReloaded;
        }
        private void ObjectSpace_ObjectReloaded(object sender, ObjectManipulatingEventArgs e) {
            Child child = e.Object as Child;
            if (child != null && ReferenceEquals(child.Parent, View.CurrentObject)) {
                View.Refresh();
            }
        }
        protected override void OnDeactivated() {
            ObjectSpace.ObjectReloaded -= ObjectSpace_ObjectReloaded;
            base.OnDeactivated();
        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ObjectReloaded 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