[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Collapse]Pivot Grid
   [Expand]Getting Started
    Integrate the PivotGrid Extension into a Project
   [Collapse]Binding to Data
     Binding to Data using Entity Framework (Code First)
     Binding to Data using Entity Framework or LINQ to SQL (Database First)
     Database Server Mode
    Main Features - PivotGrid
    Client-Side Functionality
   [Expand]UI Elements
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors Extensions
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]Query Builder
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Database Server Mode

Expanded Database Server Mode Overview

The MVC PivotGrid extension supports a specific binding mode designed to work with large datasets. Within this binding mode, data-aware operations (for instance, filtering, grouping and aggregation) are performed on the database server side, hence, this mode is called database server mode.

In database server mode, the MVC PivotGrid is bound to a queryable source using the PivotGridExtension.BindToLINQ method, which allows the PivotGrid to load data from the queryable source on demand.

When an end-user performs data operations (filtering, grouping, etc.), the PivotGrid generates smart queries to receive only those records that must be displayed on screen. These requests are passed to the associated queryable source. The queryable source translates these requests into the required queries and executes them. This ensures quick response and improved performance for large data sources.

For end-users, the MVC PivotGrid functions identically in regular and server modes.

Expanded Binding to Data

Perform the following steps to bind the PivotGrid to a data source in database server mode.

  1. Add the PivotGrid to your project

    Add the PivotGrid to your project, and bind it to a data source in regular mode using the Code First development approach or Database First development approach.

  2. Change the View code

    In the pivot grid's View code, use the PivotGridExtension.BindToLINQ method to bind the PivotGrid to a data source. This enables binding to data in database server mode.

    Partial View code ("_PivotGridPartial.cshtml"):

    If the database table that is used to generate a model does not have a primary key, pass the selectingMethod delegate method as the third PivotGridExtension.BindToLINQ method parameter and specify the LinqServerModeDataSourceSelectEventArgs.KeyExpression and LinqServerModeDataSourceSelectEventArgs.QueryableSource properties.


    Enable the PivotGridSettings.EnableRowsCache option to reduce the number of calls to a bound data source when the PivotGrid functions in Database Server Mode. When the PivotGrid extension functions in regular data binding mode, the PivotGridSettings.EnableRowsCache should be disabled.

Expanded Server Mode Limitations

In server mode, the pivot grid does not have simultaneous access to bound data in its entirety, and this imposes some limitations on the pivot grid's features. See the list below for information on features that are not supported in server mode.

Besides the limitations above, the pivot grid extension has an export limitation. The PivotGridExtension class does not provide special methods for exporting if the Server Mode data source is used. The following example demonstrates how to use the default ExportTo... methods to export data by creating a ServerModeDataSource object in code.


Note that in server mode, the pivot grid is bound to data in read-only mode.

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