BaseObjectSpace.Refresh() Method
Invalidates all previously loaded objects in the current Object Space and resets any unsaved changes made by users.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v25.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Returns
| Type | Description |
|---|---|
| Boolean |
|
Remarks
The Refresh method resets objects loaded by the current Object Space. Additionally, if there are unsaved changes, it raises the ConfirmationRequired event, and the handler’s ConfirmationResult determines what happens next:
No– The changes are reloadedYes– The changes are saved and reloadedCancel– Refresh operation is aborted
The Refresh method resets all unsaved changes and invalidates previously loaded objects. If the method completes successfully, it returns true.
Use this method to update the current Object Space’s persistent objects. For example, the built-in RefreshController.RefreshAction Action uses this method.
The following events related to the Refresh method are available:
-
Handle this event to prevent the
Refreshmethod from refreshing. Set the handler’sCancelEventArgs.Cancelparameter totrueto block the refresh. -
Handle this event to perform a custom refresh operation. Set the handler’s
CompletedEventArgs.Handledproperty totrueto show that you already performed the refresh. Set the handler’sCompletedEventArgs.IsCompletedproperty to the value that theRefreshmethod returns.