[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Binding to Data
     Binding to Data Overview
    [Collapse]Items Source Configuration Wizard
      ADO.NET Typed DataSet
      Unbound Data Source
      Entity Framework
      Entity Framework (EF) Core
      LINQ to SQL
      WCF Data Services
      OData V4 Services
      XPO Data Source
      OLAP Cube
      IList and IEnumerable Data Sources
      ICollectionView Specifics
    [Expand]OLAP Data Source
    [Expand]Database Server Mode
     Unbound Fields
     Optimized Mode and Data Binding API
     Local Data Stores
     Asynchronous Mode
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Entity Framework (EF) Core

The Items Source Configuration Wizard allows you to bind the PivotGridControl to an SQL database using the Entity Framework Core at design time. This topic guides you through the required steps.

Note

In this tutorial, the PivotGridControl is bound to the Sales MS SQL database. Refer to the Getting started with EF Core on .NET Framework with an Existing Database topic for details on how to generate Entity Framework models for existing SQL databases.

  1. Click the PivotGridControl's smart tag and select the Items Source Wizard command.

  2. In the invoked Items Source Configuration Wizard, select Entity Framework (EF) Core...

    ... and ensure the Data Sources area displays a context name.

  3. On the next page, select the binding method.

    • Simple Binding - allows you to bind the PivotGridControl to an EF Core data source directly.
    • Manipulating Data via ICollectionView - allows you to bind the PivotGridControl to an EF Core data source using the ICollectionView component, which enables collections to have the current record management functionalities, custom sorting, filtering, and grouping. See ICollectionView Specifics for more details.

    Select Simple Binding and click Next.

  4. On the final page, specify the table and click Finish.

  5. The PivotGridControl is now bound to the created data source.

    You can now use the Retrieve Fields command to retrieve the available data source fields. To retrieve fields in code, use the PivotGridControl.RetrieveFields method.

    Note

    Note that the Items Source Configuration Wizard adds the created data source to window resources.

    Then, it binds the PivotGridControl to the created data source.

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