Example of Dynamic Binding in ASP.NET MVC Pivot Table Control
This sample showcases how to dynamically load data from multiple data sources in the Pivot Table, including local and remote JSON/CSV files, as well as an OLAP(XMLA) data source via customized toolbar menu options. Additionally, you can save and reload Pivot Table report(s) as JSON files for future analysis.
This sample demonstrates how to dynamically load data from various sources into the Pivot Table at runtime. You can load one data source at a time using the custom toolbar option. You can also save and load Pivot Table report(s) using the custom toolbar options, which are explained below one by one.
Open a Data Source:
JSON- Local JSON Data: Use the first toolbar option → JSON → Local to choose and load a JSON data source file from your machine.
- Remote JSON Data: Use the first toolbar option → JSON → Remote to enter a remote JSON data source file URL and load it.
- Local CSV Data: Use the first toolbar option → CSV → Local to choose and load a CSV file from your machine.
- Remote CSV Data: Use the first toolbar option → CSV → Remote to enter a remote CSV file URL and load it.
- Select the OLAP(XMLA) menu option from the first toolbar item to open a connection popup and provide server details.
Load a Pivot Report:
- Local JSON Pivot Report: Second toolbar option → Load Pivot Report → Local JSON to choose and load a saved pivot report.
- Remote JSON Pivot Report: Second toolbar option → Load Pivot Report → Remote JSON to enter a remote pivot report URL and load it.
Save a Pivot Report:
You can save the Pivot Table report as a JSON file by clicking the third toolbar option (Save Pivot Report as JSON). In this example, the report configurations are saved excluding the raw data source.
More information can be found in the Pivot Table Data Binding and Save and load report as a JSON file documentation sections.