PivotView
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
The pivot table is an easily configurable, presentation-quality business control used for visualizing relational data sources in cross-tabular format. It is displayed with drill-up and drill-down capabilities and allows users to easily aggregate data.
- C#
- VB.NET
public class PivotView : ej2Base
Public Class PivotView
Inherits ej2Base
Constructors
PivotView()
Constructs a new instance of the PivotView class.
Example:
The following example creates a pivot table that sums the amounts by country and year, and configures it through the Options object.
var pivotView = new PivotView();
pivotView.Options.dataSourceSettings = new
{
dataSource = sales,
rows = new[] { new { name = "country" } },
columns = new[] { new { name = "year" } },
values = new[] { new { name = "amount", caption = "Sales" } }
};
pivotView.Dock = DockStyle.Fill;
this.Controls.Add(pivotView);
PivotView(options)
Constructs a new instance of the PivotView class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a pivot table with the grouping bar and the field list, that shows the sold units and the amounts formatted as currency.
var pivotView = new PivotView(new
{
showGroupingBar = true,
showFieldList = true,
dataSourceSettings = new
{
dataSource = new[]
{
new { country = "France", product = "Bikes", year = "2023", units = 120, amount = 54000.0 },
new { country = "Germany", product = "Bikes", year = "2024", units = 95, amount = 42750.0 }
},
expandAll = true,
rows = new[] { new { name = "country" }, new { name = "product" } },
columns = new[] { new { name = "year" } },
values = new[] { new { name = "units", caption = "Units" }, new { name = "amount", caption = "Amount" } },
formatSettings = new[] { new { name = "amount", format = "C0" } }
}
});
pivotView.Dock = DockStyle.Fill;
this.Controls.Add(pivotView);