[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  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
  [Expand]Property Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Binding to Data
     Binding to Data Overview
    [Collapse]Data Source Configuration Wizard
      ADO.NET Data
      SQL Data
      Excel Data Source
      Unbound Data Source
      Entity Framework Data
      Entity Framework (EF) Core
      LINQ to SQL
      WCF Data Services
      OData V4
      XPO Data Source
      IList and IEnumerable Data Sources
      XML Data
      OLAP Cube
      BindingSource Component 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]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]Design-Time Features
   [Expand]Miscellaneous
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Gantt Control
  [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]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]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 Data

The Data Source Configuration Wizard allows you to bind the PivotGridControl (see PivotGridControl) to a SQL database using Entity Framework at design time. Follow the steps below to accomplish this task.

  1. Open the form with the PivotGridControl in Visual Studio Designer. Click the Data Source Wizard button located on the PivotGridControl design surface or use the related command in the control's smart tag.

  2. In the invoked Data Source Configuration Wizard, select Entity Framework...

    ... and click the New Data Source button located in the Data Sources area.

  3. The following message appears:

    Click OK.

  4. Make sure that the ADO.NET Entity Data Model item is selected in the invoked dialog. Then, specify the name (in this example, NorthWindModel) and click Add.

  5. The following image gallery shows the Entity Data Model Wizard in three steps required to create the Data Model.

    When you click Finish at the last Entity Data Model Wizard screen, the following warning appears:

    Click OK to run the Entity Framework template that creates a data model.

  6. The created model looks as follows:

Important

After you create a data model, rebuild the solution.

  1. After creating a data model, click the Data Source Wizard button again.

  2. In the invoked Data Source Configuration Wizard, select the created data source.

    Click Next.

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

    Select Direct Binding to Data Source and click Next.

  4. On the final page, specify the data source table..

    .. and click Finish.

  5. The Data Source Configuration Wizard generates the following code:

Expanded See Also

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