Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
    [Collapse]Providing Data
      How to: Bind a PivotGridControl to a Database
      How to: Bind a Pivot Grid to an OLAP Datasource
      How to: Bind a PivotGridControl to an OLAP Cube Using the OLE DB Data Provider
      How to: Bind a PivotGridControl to an OLAP Cube Using the ADOMD.NET Data Provider
      How to: Bind a PivotGridControl to an OLAP Cube via XMLA
      How to: Add an Unbound Field to Supply Additional Data
      How to: Add an Unbound Field to Change Axis Detailing
      How to: Provide Data for an Unbound Field Using Expressions
      How to: Save PivotGridControl Data to a File and Work with It Later
      How to: Bind a PivotGridControl to a Database at Design Time Using Server Mode
    [Expand]Data-Related Features
    [Expand]Data Editing
    [Expand]Layout Features
    [Expand]Data Formatting
    [Expand]Data Output
    [Expand]Appearance
    [Expand]Miscellaneous
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[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
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Bind a PivotGridControl to a Database at Design Time Using Server Mode

If you need to connect a pivot grid control to a database with a large number of records, you can use server mode. The pivot grid control, if it is bound to an appropriate data source, automatically operates in server mode. You can use dedicated data sources tailored to work with 'LINQ to SQL Classes' or 'Entity Framework 4+' data access technologies.

The following example is a step-by-step guide that demonstrates how to bind a PivotGridControl to a LinqServerModeSource data source at design time using the Data Source Configuration Wizard.

This example consists of the following steps.

Expanded Launching the Data Source Configuration Wizard

  1. To invoke the Data Source Configuration Wizard, do one of the following.

    • Click the Data Source Wizard panel in the center of the pivot grid control.

    • Click the smart tag icon () displayed at the top-right of the pivot grid and select the Data Source Wizard item.

  2. Select LINQ to SQL technology and click New Data Source... button.


    The Add New Item window is invoked. This allows you to create new data classes.

Expanded Creating Data Classes

  1. Select the LINQ to SQL Classes item and add it to the project.

  2. Data classes can then be created and edited in an Object Relational Designer (O/R Designer). An O/R Designer provides a visual design surface for creating LINQ to SQL entity classes and relationships based on objects in a database.

    Create and map entity classes to tables and views by dragging database tables and views from Server Explorer onto the O/R Designer. To learn how to connect to the Northwind Database, see this MSDN Topic.

  3. Save your changes, close the O/R Designer, and rebuild the solution.

Expanded Binding to a Data Source using 'LINQ to SQL Classes'

  1. Invoke the Data Source Configuration Wizard again, select the LINQ to SQL technology and choose the previously created data source. Click Next.

  2. In the next window, select Server-Side Data Processing and click Next. This activates the server mode.

  3. Select a table and a key expression column, and click Finish to close the Data Source Configuration Wizard.

  4. The PivotGridControl is now bound to the LinqServerMode data source and automatically operates in server mode.

    To learn how to retrieve fields at design time, see the Fields Page topic.

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