[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Expand]Get Started With Data Grid and Views
   [Collapse]Data Binding
    [Collapse]Large Data Sources: Server and Instant Feedback Modes
      Data Stores Supported in Server Mode When Using XPO
      Server Mode: Binding to a Data Source Using XPO
      Entity Framework 4.0+ Server Mode Specifics
     Post Data to an Underlying Data Source
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Server Mode: Binding to a Data Source Using XPO

To enable a server mode (regular or Instant Feedback) you need to create an appropriate data source. You can use data sources provided by the eXpress Persistent Objects (XPO) library or use dedicated data sources tailored to work with 'LINQ to SQL Classes'. This topic shows how to use data sources provided by the XPO library.

In this topic, the term grid control refers to a data-aware control that supports a server mode.

Expanded Server Mode: Binding to a Data Source Using eXpress Persistent Objects

To implement a server mode using data sources provided by the eXpress Persistent Objects (XPO) library, you should do the following.


In a server mode, a target data table must contain a key field. If the table doesn't contain a key field, it cannot be used as a data source in a server mode.

Expanded Providing Descriptive Information on the Target Data

When working with XPO, you need to provide descriptive information on the target data for a server mode data source you are using. To accomplish this, use the following approach.

In code, create a persistent class derived from the XPBaseObject or its descendant that will correspond to the target data table (data view) in the data store. Assign the class' type to the XPServerCollectionSource.ObjectClassInfo or XPInstantFeedbackSource.ObjectType property. Building the project after creating the class allows you to initialize these properties at design time.

For information on creating persistent classes, please refer to the Basics of Creating Persistent Objects for Existing Data Tables topic.

Expanded Providing Connection Settings

You need to provide connection settings to enable XPO to connect to a required data store. There are multiple methods to provide connection settings:

The following code shows how to provide connection settings to the NorthWind database stored on the local MS SQLServer. The connection string is generated by the static MSSqlConnectionProvider.GetConnectionString method, which takes the names of the server and database, user name and password as parameters.

See the Grid Server Mode and Grid Instant Feedback UI demos for complete examples of implementing server modes.

Expanded See Also

Is this topic helpful?​​​​​​​