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
   [Collapse]Binding to Data
     Binding to Data Overview
    [Expand]Data Source Configuration Wizard
    [Expand]OLAP Data Source
    [Collapse]Database Server Mode
      Binding to a Data Source Using Entity Framework
      Binding to a Data Source Using 'LINQ to SQL Classes'
      Binding to a Data Source Using WCF Server
     Unbound Fields
     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]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]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Binding to a Data Source Using 'LINQ to SQL Classes'

The PivotGridControl automatically operates in server mode if it is bound to appropriate supported data source. You can use dedicated data sources tailored to work with 'LINQ to SQL Classes'. This example shows how to use LINQ query providers.

Creating Data Classes

  1. Add LINQ to SQL Classes 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. To learn more, see the MSDN topic.

    You can create and map entity classes to tables and views by dragging database tables and views from Server Explorer onto the O/R Designer.

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

Binding a Pivot Grid Control to the LinqServerModeSource component

  1. Drag the LinqServerModeSource component and drop it onto the Form.

  2. Specify the type of objects retrieved from a data source using the LinqServerModeSource.ElementType and LinqServerModeSource.KeyExpression properties.

  3. Specify the queryable source using the LinqServerModeSource.QueryableSource property. This property must be set in code.

  4. Bind the Pivot Grid control to the LinqServerModeSource component.

Note

To learn how to bind the PivotGridControl to data using the Data Source Configuration Wizard, see the LINQ to SQL tutorial.

Expanded See Also

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