Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   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
     Local Data Stores
     Asynchronous Mode
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Printing and Exporting
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]Miscellaneous
   [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]Diagram Control
  [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 Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Entity Framework

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

  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...

    ... and click the New Data Source button placed within the Data Sources area.

  3. The following message will appear.

    Click OK.

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

    To learn how to create a new Entity Framework data model from the existing database, see the following topics: Entity Framework (EF) Documentation.

    Important

    After you creat a data model, rebuild the solution.

  5. After creating a data source, click Items Source Wizard again.

  6. In the invoked Items Source Configuration Wizard, select the created data model.

    Click Next.

  7. On the next page, select the required binding method.

    Select Simple Binding and click Next.

  8. On the final page, you can specify the table.

    Select the required table and click Finish.

  9. The PivotGridControl will be 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, the PivotGridControl is bound to the created data source.

Expanded See Also

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