Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Collapse]Concepts
  [Expand]Application Solution Components
  [Expand]Business Model Design
  [Expand]Application Model
  [Collapse]UI Construction
    UI Element Overview
    Windows and Frames
   [Expand]Templates
    Action Containers
   [Collapse]Views
     Ways to Show a View
     List View Column Generation
     List View Columns Customization
     List View Bands Layout
     List View Edit Modes
    [Collapse]List View Data Access Modes Overview
      Client Mode
      Server and InstantFeedback Modes
      DataView Mode
     Display Properties of a Referenced Object in the Master Object's View
   [Expand]View Items
    List Editors
    Add and Override Images
    Text Notifications
    Ways to Show a Confirmation Dialog
    ASP.NET Web Application Appearance
    Application Personalization
    Using a Custom Control that is not Integrated by Default
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]Localization
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Filtering
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
  Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

DataView Mode

Expanded Mode Overview

The DataView mode improves List View performance by retrieving an XafDataView lightweight read-only list of data records at once, instead of loading an XPCollection or EFCollection of persistent objects.

Expanded Expected Behavior

  • The ListView.CurrentObject, ListView.SelectedObjects and SimpleActionExecuteEventArgs.SelectedObjects properties return the XpoDataViewRecord or EFDataViewRecord objects instead of original business objects. To get the real object, use the IObjectSpace.GetObject method.
  • Data for non-persistent properties does not show in List Views operating in DataView mode. However, custom calculated fields are correctly displayed in this mode if all properties referenced in IModelMember.Expression are persistent.
  • Inline editing is not supported in this mode. If an original object was modified, it does not display in a List View until you commit changes and reload the collection.
    For example, when an Action changes an object's property value, this object's instance is created by a separate database request and the property value's modification is not displayed on a grid until you commit changes (or it occurs automatically if the BaseObjectSpace.CommitChanges property is set to true).
    Also, if the Appearance and Security rules are applied to an object type in the current List View, and those criteria use objects' properties that are not contained in the CollectionSourceBase.DisplayableProperties collection, these objects' instances are created by the separate database request to check each rule.
  • Reference properties cannot be displayed in the DataView mode. The List Editor automatically replaces reference properties with their default nested properties (which can be defined using the XafDefaultPropertyAttribute attribute) when retrieving data. For instance, in the Employee List View, the Employee.Department property is replaced with Employee.Department.Title.
  • The DataView mode is currently supported by a number of built-in List Editors - the GridListEditor, SchedulerListEditor, PivotGridListEditor used in WinForms applications, and the ASPxGridListEditor, ASPxSchedulerListEditor, ASPxPivotGridListEditor used in ASP.NET Web applications.
  • The SchedulerListEditor and ASPxSchedulerListEditor editors do not support Resources in this mode.
  • In nested List Views, the Link, Unlink, New, Delete and Edit Actions are disabled by design.
  • The OpenObjectController.OpenObject Action is inactive in this mode.
  • Using invisible properties in criteria evaluation is processed correctly, but it may have a negative performance impact because it leads to loading real objects through separate database requests. Using collection properties can cause much more recursive requests. Consider using the Client Mode instead of DataView mode if you cannot avoid using such criteria because there is no difference in performance.

Note

If you use the Entity Framework as your ORM system, implement Aggregated collections' cascade deletion as described in the Cascade Deletion for Aggregated Entities section of the Relationships Between Entities in Code and UI topic.

How would you rate this topic?​​​​​​​