Skip to main content

WCF Data Services

  • 2 minutes to read

The Items Source Configuration Wizard allows you to bind the PivotGridControl to data using WCF Data Services. 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 WCF Data Services


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


  3. The following message will appear.


    Click OK.

  4. Specify the address of a data service.


    To learn how to create a WCF data service, see the following topics: Creating the Data Service.


    After you create a service reference, 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 service.


    Click Next.

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


    Select Simple Binding and click Next.

  8. On the final page, specify the service URI (Service Root) and click the Test Connection button.


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


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

            <dx:WcfSimpleDataSource x:Key="WcfSimpleDataSource" ContextType="{x:Type ServiceReference1:NorthwindEntities}" Path="SalesPersons" ServiceRoot="http://localhost:65455/Northwind.svc/">

    Then, the PivotGridControl is bound to the created data source.

    <dxpg:PivotGridControl DataSource="{Binding Data, Source={StaticResource WcfSimpleDataSource}}"/>