DetailView.UseAsyncLoading Field
Specifies whether the IModelAsync.UseAsyncLoading property is visible in the Model Editor.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v26.1.dll
Declaration
Field Value
| Type | Description |
|---|---|
| Boolean | true, if the IModelAsync.UseAsyncLoading property is visible in the Model Editor; otherwise, false. |
Remarks
When asynchronous data loading is enabled, only the current object of a Detail View is loaded asynchronously, its associated collections are loaded in the main thread and this locks the UI.
The Template Kit enables the UseAsyncLoading property in new projects. For this purpose, the kit generates new projects with the FrameworkSettings.DefaultSettingsCompatibilityMode property set to Latest.
If DetailView.UseAsyncLoading is set to true, note the following:
- when IModelAsync.UseAsyncLoading is true, the DetailView.CurrentObject property is set to null in the Controller.OnActivate method;
- when you open a Detail View from the Navigation, the DetailViewCreatingEventArgs.Obj argument of the ViewCreating and DetailViewCreating events is set to null;
- when you open a Detail View from a List View (by double-clicking a record or using the OpenObject Action), the DetailViewCreatingEventArgs.Obj argument of the ViewCreating and DetailViewCreating events is set to the object from the List View’s Object Space;
- when IModelAsync.UseAsyncLoading is true and you use DetailView.ObjectSpace before the Detail View’s object is initialized (for example, in Controller.OnActivated), an exception occurs. Move the logic that depends on this property to the CurrentObjectChanged handler.
Refer to the Asynchronous Data Loading topic for more information.