We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to Wrap BI PivotGridControl and PivotSchemaDesigner as Custom Control for LightSwitch

Platform: Silverlight |
Control: PivotGridControl |
Published Date: November 26, 2014 |
Last Revised Date: November 26, 2014

Steps to create a sample in Light Switch Application:

  1. Open the Visual Studio, Click File->New Project and Open Light Switch Application(Visual C#).
  2. Create a new table or attach the Data Source by right-clicking the Data Sources in Solution Explorer Window or Project-> Add Data Source in Menu Bar.
  3. Here we have attached a Data Source using Northwind Entities Data .
  4. For that Click on OData Service in Attach Data Source wizard and click Next.
  5. Specify the OData Service endpoint as “http://services.odata.org/Northwind/Northwind.svc/” and click next.
  6. Select the tables you want and click finish. (Here we have used Order_Details Table in our Sample).
  7. After attaching Data Source, Add Screen by right-clicking the Screens in Solution Explorer Window or Project-> Add Screen in Menu Bar.
  8. In the Add New Screen Window Select “Editable Grid Screen” as Screen Template and “NorthwindEntitiesData.Order_Details” as Screen Data.
  9. By Default the Screen is viewed in DataGrid View.
  10. To view the screen in Pivot Grid view, follow the steps below:
  • Create a Silverlight Class Library by adding new project.
  • Right Click the Class Library and add a new Silverlight User Control.
  • In the User Control window add a PivotGrid control.
  • Add the rows, columns, Calculation items in the Pivot Grid Control.(Note that the Field Mapping Name of rows, columns and calculation item should be occurred in Table)
  • The Item Source property of the Pivot Grid Control can be binded by giving “itemSource=” {Binding Screen.Order_Details}” “.
  • Add Pivot Schema Designer.
  1. Now add a Custom Control in Screen by Clicking Add-> New Custom control in designer page
  • Add the User Control by clicking the Add Reference button in window and selecting your Silverlight class library in Projects.
  • Build the solution and Run.

C:\Users\labuser\Dropbox\Screenshots\Screenshot 2014-05-26 15.51.22.png

Figure: Custom Control displaying Pivot Grid only


C:\Users\labuser\Dropbox\Screenshots\Screenshot 2014-05-26 15.51.37.png

Figure: Custom control displaying both pivot Grid and Schema Designer










You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon