IModelListView.DataAccessMode Property
Specifies the mode used to access the collection of business objects displayed in the current List View.
Namespace: DevExpress.ExpressApp.Model
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
#Declaration
[TypeConverter(typeof(DataAccessModeConverter))]
CollectionSourceDataAccessMode DataAccessMode { get; set; }
#Property Value
Type | Description |
---|---|
Collection |
A Collection |
Available values:
Name | Description |
---|---|
Client | The entire record set required for the current List View is loaded into memory. All the data processing takes place on the client side. |
Server | Data is requested from a data store in small portions that should currently be displayed. All data-aware operations are performed on the data server side. |
Data |
A lightweight read-only list of data records ( |
Instant |
A List View’s control continues responding to a user’s actions while the data is being retrieved in a background thread (see Instant Feedback Mode). |
Instant |
A lightweight read-only list of data records (Object |
Server |
A lightweight read-only list of data records (Object |
Queryable | The collection source constructs a query that the List Editor can modify to load only objects visible in the control. Only |
#Remarks
This property value is passed to the DataAccessMode property of the current List View’s Collection Source. You can change this property value in the Model Editor.
Refer to the following topics for detailed descriptions of the available data access modes:
- Client Mode
- Queryable Mode
- DataView Mode
- Server, ServerView, InstantFeedback, and InstantFeedbackView Modes
DataAccessMode‘s combo box displays only modes that are compatible with the selected List Editor (a node’s EditorType property). If you use a custom List Editor, specify its supported modes in the static DataAccessModeHelper.RegisterEditorSupportedModes method. Call this method from code executed at design time before the Model Editor is loaded (for example, from a Module’s constructor). Pass the List Editor’s type and a list of supported modes to this method. Otherwise, the Model Editor shows all modes for this List Editor.
using System.Collections.Generic;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Utils;
// ...
public sealed partial class MySolutionWinModule : ModuleBase {
public MySolutionWinModule() {
// ...
DataAccessModeHelper.RegisterEditorSupportedModes(typeof(CustomListEditor),
new List<CollectionSourceDataAccessMode> { CollectionSourceDataAccessMode.Client, CollectionSourceDataAccessMode.Server });
}
// ...
}
The default data access mode is Client. You can change the default mode for all root List Views and manually created nested List Views globally, using the IModelOptions.DataAccessMode property of the Options node in the Model Editor. For instance, when this property is set to Server, all List Views, except for the autogenerated nested List Views, have their DataAccessMode property set to Server as well.
Note
For List View variants, the root varied View and each variant View can have individual Data
When the View Variants are displayed in Navigation (see View Variants Module), XAF displays the variant Views using their Data