We don’t have a PivotGrid control under Web Forms. We have the PivotGrid control under WPF and Silverlight Platforms. We can bind the SQL database file data as the DataTable to the PivotGrid
Please find the steps to have our PivotGrid bind with the data from the SQL Database file.
1) - Create the sdf file with the datas stored in it (in the provided sample DataBase1.sdf) and add it to the WPF application.
2) - Drag and drop our PivotGrid control from the toolbox to the MainPage.XAML.
3) - Then, write a method and use the SqlCeConnection to make the connection with the database, SqlCeCommand to get the columns from the sql Table and SqlCeDataAdapter which is used to execute the command and returns the datas from the sdf file as the DataTable as shown in the below code (we have this under OrderDetails.cs file)
Now, bind this DataTable to the PivotGrid using ItemSource property in PivotGrid with the below code.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|