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]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
    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
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

Server and InstantFeedback Modes

Expanded Modes Overview

Server Mode

In the Server mode, a List View does not have simultaneous access to all the objects of the ListView.CollectionSource's type. Only those objects that are currently visible are loaded in small portions on demand. Each operation that assumes that new visible objects appear (scrolling, paging, grouping, sorting), requires additional data requests. Data-aware operations (grouping, sorting, etc.), are performed by the database server and significantly increases the List View's performance when working with a large number of objects. In this mode, all properties are calculated when it is required (only the visible in the GridView and that is used in the Appearance, Security rules, etc).
In Mobile applications, only the Server mode is supported.

InstantFeedback Mode

In the InstantFeedback mode, a List View does not have simultaneous access to all the objects of the Collection Source's type as well as in the Server mode. The data-aware operations are performed asynchronously in the background thread, and the control continues responding to a user's actions, while data is being retrieved. By default, the CollectionSourceBase.DisplayableProperties property contains property names from the source collection. In XPO, these are the names of all visible properties and properties listed in XPInstantFeedbackSource.DisplayableProperties. In EF, only visible properties are listed by default. Unlike the Server mode, these lists are populated at once before the grid data is displayed. As a result, all properties listed in CollectionSourceBase.DisplayableProperties can be accessed without additional database requests.

Expanded Expected Behavior

  • If you use a legacy database whose table has a primary compound key, such a table cannot be used to supply data in Server mode.
  • If you have a custom Controller that accesses the List Editor's control of a List View to perform custom sorting or grouping, the Controller may no longer work, since the database server performs grouping and sorting. Custom summaries are also calculated on the server side.
  • Controls that support the Server and InstantFeedback modes do not have full access to underlying data and cannot initiate the filtering, sorting and grouping operations on the client side. These operations are delegated to the underlying ORM (Entity Framework or XPO), which constructs an appropriate SQL statement and performs a query to the SQL server to retrieve a small portion of data that should immediately display to the user. You cannot filter, sort and group data against non-persistent properties - it is not possible to build a SQL query against a runtime value existing on the client side only, and execute it on the database server. Filtering, grouping and sorting operations are disabled if a property is non-persistent.
  • Two built-in List Editors currently support the Server mode: the GridListEditor, used by default in WinForms applications, and the ASPxGridListEditor, used by default in ASP.NET Web applications. The InstantFeedback mode is compatible with the WinForms GridListEditor only.

The InstantFeedback mode has its own specificities listed below:

  • The View.CurrentObject and View.SelectedObjects properties return XafInstantFeedbackRecord objects instead of original business objects. To get the real object, use the IObjectSpace.GetObject method.
  • 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 the 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).
    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.
  • In XPO, the default InstantFeedback mode behavior may cause performance issues. Properties which are hidden in the UI but are listed in CollectionSourceBase.DisplayableProperties may have complicated logic in getters which requires a large amount of database requests. You can change the default behavior using the XPObjectSpace.InstantFeedbackMappingMode property.
  • In Entity Framework or XPO, when the XPObjectSpace.InstantFeedbackMappingMode value is RequiredProperties and required calculated properties are invisible, add them to the CollectionSourceBase.DisplayableProperties list. Otherwise, additional database requests may occur.
  • Reference properties are automatically replaced by default properties of the corresponding reference objects when sorting, grouping and filtering. For instance, in the Contact List View, the Contact.Department.Title property is used instead of Contact.Department.

Note

If you use the Entity Framework as your ORM system and InstantFeedback data access mode, 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.

Expanded See Also

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