Class PivotViewDataSourceSettings<TValue>
Represents the data source configuration for the Pivot Table (PivotView), including rows, columns, values, filters, sorting, formatting, grouping, drilling, and OLAP connection settings used to render the Pivot Table and Field List.
Catalog: Specifies the SSAS database (catalog) name. Applicable only for OLAP data sources.
Cube: Specifies the SSAS cube name. Applicable only for OLAP data sources.
ProviderType: Identifies the provider used to render the report (Relational or SSAS).
Url: Specifies the service endpoint that processes requests and returns data.
LocaleIdentifier: Sets the culture code (LCID) used for OLAP localization. The default is 1033 (en‑US). Applicable only for OLAP.
DataSource`: Binds a JSON collection from a local or remote source to render the Pivot Table and Field List. Applicable only for relational data sources.
Rows, Columns, Values, Filters: Configures fields for row/column axes, aggregated values, and filter axis.
ExcludeFields: Hides specified fields in the Field List (relational data only).
ExpandAll: Expands or collapses all headers on initial render (relational data only).
ValueAxis: Positions value fields on either the row or column axis.
FilterSettings: Defines selective (member) and conditional (label/value) filters.
SortSettings and EnableSorting: Orders field members in ascending or descending order (sorting must be enabled).
FormatSettings: Applies numeric display formats (for example, currency, percent) to value fields.
DrilledMembers: Sets initial expand/collapse state for specific headers.
ValueSortSettings: Sorts aggregated values of individual measures on row/column axes.
CalculatedFieldSettings: Creates calculated measures using fields or formulas with arithmetic operators.
AllowMemberFilter, AllowLabelFilter, AllowValueFilter: Enables member-, label-, and value-based filtering features.
ShowSubTotals, ShowRowSubTotals, ShowColumnSubTotals: Shows or hides sub‑totals on row/column axes.
ShowGrandTotals, ShowRowGrandTotals, ShowColumnGrandTotals: Shows or hides grand totals on row/column axes.
GrandTotalsPosition: Displays grand totals at the top or bottom of the axes (default: bottom).
SubTotalsPosition: Displays sub‑totals at the top or bottom of header groups (by default, column at bottom and row at top).
ShowHeaderWhenEmpty: Displays undefined headers for missing raw data (for example, “United Kingdom >> Undefined”).
AlwaysShowValueHeader: Always displays the “Values” header even when a single value field exists.
ConditionalFormatSettings: Applies conditional formatting to value cells based on rules and styles.
EmptyCellsTextContent: Displays custom text for empty value cells (for example, “0”, “-”, “(blank)”).
GroupSettings: Groups fields by type (date intervals, numeric ranges, and custom string groups).
ShowAggregationOnValueField: Displays aggregation type with value field caption in Grouping Bar and Field List.
Authentication: Provides credentials for secured SSAS endpoints (OLAP only).
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class PivotViewDataSourceSettings<TValue> : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IPivotViewDataSourceSettings
Type Parameters
| Name | Description |
|---|---|
| TValue | A type which provides schema for the pivot component. |
Constructors
PivotViewDataSourceSettings()
Declaration
public PivotViewDataSourceSettings()
Properties
AllowLabelFilter
Gets or sets a value indicating whether label filtering is enabled on row and column axis fields using header text. When true, a filter icon appears next to fields in the field list or grouping bar. Selecting it opens the filter dialog with a “Label” tab supporting:
- String: Choose an operator (for example, Equals, Contains) and enter text.
- Number: Choose an operator (for example, GreaterThan, Between) and enter numeric value(s).
- Date: Choose an operator and pick date(s) using the built-in calendar.
Declaration
[Parameter]
[JsonPropertyName("allowLabelFilter")]
public bool AllowLabelFilter { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether label filtering is enabled. The default value is false. |
Remarks
For example, for a “Country” field, to show names that contain “United”, set Value1 to “United” and Condition to Operators.Contains.
Available operators:
Equals,DoesNotEqualsBeginWith,DoesNotBeginWithEndsWith,DoesNotEndsWithContains,DoesNotContainsGreaterThan,GreaterThanOrEqualToLessThan,LessThanOrEqualToBetween,NotBetween
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" AllowLabelFilter="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
AllowMemberFilter
Gets or sets a value indicating whether member filtering is enabled on fields in the row, column, and filter axes. When true, a filter icon appears next to each field in the field list or grouping bar, enabling inclusion or exclusion of specific members. The member filter dialog supports:
- Including or excluding members by checking or unchecking them.
- Searching for specific members to filter.
- Viewing and modifying the currently applied filter criteria.
Declaration
[Parameter]
[JsonPropertyName("allowMemberFilter")]
public bool AllowMemberFilter { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether member filtering is enabled. The default value is true. |
Remarks
Member filtering applies to dimension fields in the row, column, and filter axes and does not apply to value fields (measures).
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" AllowMemberFilter="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
AllowValueFilter
Gets or sets a value indicating whether value-based filtering is enabled for the Pivot Table. When true, a filter icon appears next to fields in the field list or grouping bar. Selecting it opens the filter dialog, where the “Value” tab allows filtering using a selected value field (measure) and a comparison condition. Supported operators include:
- Equals / Does not equal
- Greater than / Greater than or equal
- Less than / Less than or equal
- Between / Not between
Declaration
[Parameter]
[JsonPropertyName("allowValueFilter")]
public bool AllowValueFilter { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether value filtering is enabled. The default value is false. |
Remarks
Value filtering applies only when at least one value field (measure) is defined.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" AllowValueFilter="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
AlwaysShowValueHeader
Gets or sets a value indicating whether the value field header is always shown, even when only a single value field is present.
Declaration
[Parameter]
[JsonPropertyName("alwaysShowValueHeader")]
public bool AlwaysShowValueHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the value header is always displayed. The default value is false. |
Remarks
When true, a “Values” header appears on the value axis regardless of the number of value fields. When false, the header is omitted if only one value field exists.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" AlwaysShowValueHeader="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
Authentication
Specifies IIS Basic Authentication credentials for accessing an SSAS (OLAP) endpoint.
Declaration
[Parameter]
[JsonPropertyName("authentication")]
public PivotViewAuthentication Authentication { get; set; }
Property Value
| Type | Description |
|---|---|
| PivotViewAuthentication | A PivotViewAuthentication containing the account name and password for IIS Basic Authentication. |
Remarks
Applicable only for OLAP data sources secured by IIS Basic Authentication. Requires a valid IIS account with access to the SSAS endpoint.
The following properties must be set on PivotViewAuthentication:
- UserNameIIS-recognized account name for Basic Authentication.
- PasswordPassword for the specified
UserName. Treat this as sensitive data.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="350">
<PivotViewDataSourceSettings>
<!-- Other settings -->
<PivotViewAuthentication UserName="accountName" Password="password" />
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
CalculatedFieldSettings
Enables creation of calculated fields at runtime using fields from the data source and basic arithmetic operators (+, -, *, /).
When ShowFieldList="true", a CALCULATED FIELD button appears in the Field List UI and opens a dialog to define the field name and formula.
Declaration
[Parameter]
[JsonPropertyName("calculatedFieldSettings")]
public List<PivotViewCalculatedFieldSetting> CalculatedFieldSettings { get; set; }
Property Value
| Type |
|---|
| List<PivotViewCalculatedFieldSetting> |
Remarks
Calculated fields can also be predefined using PivotViewCalculatedFieldSetting and referenced in the Values axis with Type=SummaryTypes.CalculatedField.
Formula syntax: Use field aggregates in quotes, for example: "\"Sum(Amount)\" + \"Sum(Sold)\"".
Examples
@code {
public string totalPrice = "\"Sum(Amount)\" + \"Sum(Sold)\"";
}
<SfPivotView TValue="ProductDetails" ShowFieldList="true">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewValues>
<PivotViewValue Name="Total" Caption="Total Amount" Type="SummaryTypes.CalculatedField" />
</PivotViewValues>
<PivotViewCalculatedFieldSettings>
<PivotViewCalculatedFieldSetting Name="Total" Formula="@totalPrice" />
</PivotViewCalculatedFieldSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
Catalog
Specifies the database name (catalog) of the SSAS cube from which data is retrieved.
Declaration
[Parameter]
[JsonPropertyName("catalog")]
public string Catalog { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the SSAS catalog (database) name used when connecting to an OLAP cube.
The default value is |
Remarks
The Catalog property defines the SSAS database (catalog name) used to fetch data when connecting to a
SQL Server Analysis Services (SSAS) OLAP cube via the specified connection URL and cube name.
Applicable only for OLAP data sources with SSAS.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="350">
<PivotViewDataSourceSettings TValue="ProductDetails" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" LocaleIdentifier="1033" EnableSorting="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
Columns
Specifies the collection of fields to display on the column axis of the Pivot Table. Each item is a PivotViewColumn that controls caption, visibility of sub-totals, and UI icons (filter, sort, edit, remove), among others.
Declaration
[Parameter]
[JsonPropertyName("columns")]
public List<PivotViewColumn> Columns { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewColumn> | A List<T> of PivotViewColumn objects representing column-axis fields. The default value is an empty collection. |
Remarks
The following features are commonly configured per column field:
Name: Field name shown on the column axis.Caption: Custom label displayed in the UI.ShowNoDataItems: Shows members even when intersections have no data (relational data only).ShowSubTotals: Shows or hides sub-totals for the field.IsNamedSet: Indicates an OLAP named set (OLAP only).IsCalculatedField: Indicates a calculated field (OLAP only).ShowFilterIcon,ShowSortIcon,ShowRemoveIcon,ShowEditIcon: Enables related UI actions.AllowDragAndDrop: Enables or disables dragging the field at runtime.ExpandAll: Expands or collapses headers for the field.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewColumns>
<PivotViewColumn Name="Year" Caption="Production Year" ShowNoDataItems="true" ShowSubTotals="false" />
</PivotViewColumns>
...
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
ConditionalFormatSettings
Gets or sets the collection of conditional formatting rules that apply styles to Pivot Table value cells based on specified conditions.
Declaration
[Parameter]
[JsonPropertyName("conditionalFormatSettings")]
public List<PivotViewConditionalFormatSetting> ConditionalFormatSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewConditionalFormatSetting> | A List<T> of PivotViewConditionalFormatSetting objects that define visual formatting rules (for example, background color, font properties, and thresholds). The default value is an empty collection. |
Remarks
This collection supports multiple rules and is evaluated against value cells to enhance data interpretation.
To configure at runtime via the built-in dialog, set AllowConditionalFormatting and ShowToolbar to true,
and include ToolbarItems.ConditionalFormatting in the Toolbar property.
Key members of PivotViewConditionalFormatSetting include:
Measure: The value field name to which the rule applies.Conditions: The comparison operator (for example, GreaterThan, Between).Value1/Value2: Threshold values used by the operator.PivotViewStyle: Custom styles such as background color and font settings.
Examples
There are two approaches to apply conditional formatting in the Pivot Table:
- Enable the feature from the toolbar using the
AllowConditionalFormattingproperty. - Define rules programmatically using the
PivotViewConditionalFormatSettingstag.
<SfPivotView TValue="ProductDetails" AllowConditionalFormatting="true" ShowToolbar="true" Toolbar="@toolbar">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewConditionalFormatSettings>
<PivotViewConditionalFormatSetting Measure="Amount" Conditions="Condition.GreaterThan" Value1="1000">
<PivotViewStyle BackgroundColor="#80cbc4" Color="black" FontFamily="Tahoma" FontSize="12px" />
</PivotViewConditionalFormatSetting>
</PivotViewConditionalFormatSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
@code{
public List<ToolbarItems> toolbar = new List<ToolbarItems> {
ToolbarItems.ConditionalFormatting
};
}
Cube
Gets or sets the SSAS cube name used to retrieve data for rendering the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("cube")]
public string Cube { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string specifying the OLAP cube name. The default value is |
Remarks
Applicable only when ProviderType is set to SSAS.
Ensure that related OLAP connection properties such as Catalog and Url are also configured.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="350">
<PivotViewDataSourceSettings TValue="ProductDetails" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://blazor.syncfusion.com/olap/msmdpump.dll" LocaleIdentifier="1033" EnableSorting="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
DataSource
Binds a JSON collection to the Pivot Table, sourced locally or remotely, to render the Pivot Table and Field List.
Data can be retrieved from remote endpoints using DataManager.
Applicable only for relational data sources.
Declaration
[Parameter]
[JsonPropertyName("dataSource")]
[JsonIgnore]
public IEnumerable<TValue> DataSource { get; set; }
Property Value
| Type |
|---|
| IEnumerable<TValue> |
DataSourceChanged
Event invokes collapsed in the pivot table.
Declaration
[Parameter]
[JsonIgnore]
public EventCallback<IEnumerable<TValue>> DataSourceChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<IEnumerable<TValue>> |
DrilledMembers
Gets or sets a collection of drilled member settings for controlling the expand/collapse state of specific headers in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("drilledMembers")]
public List<PivotViewDrilledMember> DrilledMembers { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewDrilledMember> | A List<T> of PivotViewDrilledMember objects that define which field members are expanded or collapsed on initial load. The default value is an empty collection. |
Remarks
The Pivot Table supports programmatic expansion or collapse of specific members in fields within the row or column axes using the PivotViewDrilledMember class.
Key properties include:
Name: Specifies the field name whose members are to be expanded or collapsed.Items: Defines the specific members to expand or collapse.Delimiter: Specifies the separator for hierarchical member paths.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<!-- Other configurations -->
<PivotViewDrilledMembers>
<PivotViewDrilledMember Name="Quarter" Delimiter="~~" Items="@(new string[] { "FY 2015~~Q1" })" />
<PivotViewDrilledMember Name="Year" Items="@(new string[] { "FY 2015","FY 2016" })" />
</PivotViewDrilledMembers>
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
EmptyCellsTextContent
Gets or sets the custom text displayed in value cells that have no data.
Declaration
[Parameter]
[JsonPropertyName("emptyCellsTextContent")]
public string EmptyCellsTextContent { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string used to fill empty value cells (for example, |
Remarks
This setting affects only value cells with no data; it does not modify the underlying data source.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" EmptyCellsTextContent="(blank)">
...
</PivotViewDataSourceSettings>
</SfPivotView>
EnableServerSideAggregation
Gets or sets a value indicating whether the Pivot Table retrieves pre-aggregated data from the server.
Declaration
[Parameter]
[JsonPropertyName("enableServerSideAggregation")]
public bool EnableServerSideAggregation { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether server-side aggregation is enabled. When true, grouping and aggregation are performed on the server and only aggregated data is returned to the client, which can improve performance for large datasets (especially in WebAssembly). The default value is false, where grouping and aggregation occur on the client. |
Remarks
This option reduces client-side computation and network payload by delegating aggregation work to the server.
Particularly beneficial in WebAssembly (WASM) scenarios and with large data sources.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" EnableServerSideAggregation="true">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
EnableSorting
Gets or sets a value indicating whether sorting is enabled to order members of specific fields in ascending or descending order in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("enableSorting")]
public bool EnableSorting { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether sorting is enabled. The default value is true. |
Remarks
When enabled, members can be sorted through sort icons in the field list or grouping bar.
Sorting can also be configured programmatically for a specific field using PivotViewSortSetting.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" EnableSorting="true">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
ExcludeFields
Gets or sets the field names to hide from the Field List UI. Fields listed here are not available for report configuration. Applicable only for relational data sources.
Declaration
[Parameter]
[JsonPropertyName("excludeFields")]
public string[] ExcludeFields { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] | A string array containing field names to exclude. The default value is null. |
Remarks
Excluded fields are hidden from the Field List and cannot be added to rows, columns, values, or filters at runtime.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ExcludeFields="@(new[] { "InternalNotes", "IsArchived" })">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
ExpandAll
Gets or sets a value indicating whether all headers in the Pivot Table are expanded on initial render.
Declaration
[Parameter]
[JsonPropertyName("expandAll")]
public bool ExpandAll { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool that determines the initial expansion state of hierarchical headers. When true, all headers are expanded; otherwise, they remain collapsed. The default value is false. |
Remarks
Applicable to relational data sources and affects only the initial view.
Expanding all headers increases visibility of all levels; keeping them collapsed can reduce visual clutter and improve performance.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ExpandAll="true">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
FieldMapping
Represents the collection of field mappings that customize how fields appear and behave in the Pivot Table for the current PivotViewDataSourceSettings<TValue>.
Declaration
[Parameter]
[JsonPropertyName("fieldMapping")]
public List<PivotViewField> FieldMapping { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewField> | A List<T> of PivotViewField items that define field identification, display, aggregation, positioning, and UI behavior. The default value is an empty collection. |
Remarks
Field mapping allows customizing display names, data types, aggregation methods, positioning, and UI interaction for fields without modifying the original data source. When a field is defined in both the initial pivot report and in field mapping, the initial report settings take precedence.
Aggregation- and no-data-related configurations apply only to relational data sources. OLAP-specific options apply only to OLAP data sources.
Available options by category:
-
Field identification and display:
Name(source field),Caption(display name),DataType(string,number,datetime,date,boolean). -
Aggregation and calculation (relational only):
Type(sum [default], product, count, average, minimum, maximum),BaseField,BaseItem(for comparison types such asDifferenceFrom,PercentageOfDifferenceFrom,PercentageOfParentTotal). -
Field positioning and behavior:
Axis(row, column, value, filter),ShowNoDataItems(default: false; relational only),ShowSubTotals(default: true). -
OLAP-specific options:
IsNamedSet(default: false),IsCalculatedField(default: false). -
UI interaction controls:
ShowFilterIcon(default: true),ShowSortIcon(default: true),ShowRemoveIcon(default: true),ShowValueTypeIcon(default: true),ShowEditIcon(default: true),AllowDragAndDrop(default: true).
Examples
Demonstrates configuring the visibility of field button icons using PivotViewField entries in PivotViewDataSourceSettings<TValue>.
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewFieldMapping>
<PivotViewField Name="Quarter" ShowSortIcon="false"></PivotViewField>
<PivotViewField Name="Products" ShowFilterIcon="false" ShowRemoveIcon="false"></PivotViewField>
<PivotViewField Name="Amount" ShowValueTypeIcon="false" Caption="Sold Amount"></PivotViewField>
</PivotViewFieldMapping>
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
FilterSettings
Gets or sets the collection of filter settings applied to fields in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("filterSettings")]
public List<PivotViewFilterSetting> FilterSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewFilterSetting> | A List<T> of PivotViewFilterSetting items that define member, label, or value filters for specific fields. The default value is an empty collection. |
Remarks
Filters refine the displayed data by including or excluding members, or by applying label/value conditions on row or column headers.
Member, label, and value filters are enabled only when the corresponding feature flags are allowed in PivotViewDataSourceSettings<TValue>:
AllowMemberFilter, AllowLabelFilter, and AllowValueFilter.
Filter categories:
- Member filter (via FilterType.Include / FilterType.Exclude): Selects explicit members to include or exclude for the target field.
- Label filter: Applies string or date comparisons on header captions (for example, Equals, DoesNotEqual, BeginsWith, EndsWith, Contains, Between).
- Value filter: Applies numeric comparisons on aggregated values (for example, Equals, NotEquals, GreaterThan, LessThan, Between) against a chosen measure.
Examples
Demonstrates configuring member (include), label (begins with), and value (greater than) filters.
<SfPivotView TValue="ProductDetails" ShowFieldList="true" ShowGroupingBar="true">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewRows>
<PivotViewRow Name="Country" />
<PivotViewRow Name="Products" />
</PivotViewRows>
<PivotViewColumns>
<PivotViewColumn Name="Year" />
</PivotViewColumns>
<PivotViewValues>
<PivotViewValue Name="Amount" Caption="Sales Amount" />
</PivotViewValues>
<PivotViewFilterSettings>
<!-- Member filter: include only specified countries -->
<PivotViewFilterSetting Name="Country"
Type="FilterType.Include"
Items="@(new string[] { \"France\", \"Germany\" })" />
<!-- Label filter: product names that begin with "S" -->
<PivotViewFilterSetting Name="Products"
Measure=""
Condition="LabelFilterType.BeginsWith"
Value1="S" />
<!-- Value filter: sales amount greater than 10000 -->
<PivotViewFilterSetting Name="Products"
Measure="Amount"
Condition="ValueFilterType.GreaterThan"
Value1="10000" />
</PivotViewFilterSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
Filters
Gets or sets the collection of fields placed on the filter axis to filter values in other axes.
Supported configurations include Name (field name), Caption (UI display text), ShowNoDataItems,
ShowSubTotals, IsNamedSet (OLAP), IsCalculatedField (OLAP), UI icons (filter, remove, edit),
and AllowDragAndDrop to restrict runtime dragging.
Declaration
[Parameter]
[JsonPropertyName("filters")]
public List<PivotViewFilter> Filters { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewFilter> | A List<T> of PivotViewFilter representing filter-axis fields. The default value is an empty collection. |
Remarks
Filter-axis fields constrain members displayed on the row, column, and value axes without modifying the report schema.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewFilters>
<PivotViewFilter Name="ProductCategory" Caption="Category" ShowNoDataItems="true" />
</PivotViewFilters>
...
</PivotViewDataSourceSettings>
</SfPivotView>
FormatSettings
Gets or sets the collection of number format settings applied to value fields (measures) in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("formatSettings")]
public List<PivotViewFormatSetting> FormatSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewFormatSetting> | A List<T> of PivotViewFormatSetting items that define display formats (for example, currency, percent, or custom numeric patterns) for specific value fields. The default value is an empty collection. |
Remarks
Formatting applies primarily to measure cells (value fields).
In addition, format settings can also be applied to row and column headers for enhanced readability.
Use standard or custom .NET format strings (for example, "C2", "P0", "N0").
Behavior notes:
- Each entry targets a value field by its
Name. If a value field has no matching format setting, default formatting is used. - Formatting affects aggregated results (sum, average, etc.) and can also be applied to row and column headers.
- Invalid or unsupported format strings fall back to default string conversion.
- Large datasets may incur minor runtime formatting overhead.
Examples
Demonstrates applying currency and integer formats to value fields.
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewValues>
<PivotViewValue Name="Amount" Caption="Sales Amount" />
<PivotViewValue Name="Sold" Caption="Units Sold" />
</PivotViewValues>
<PivotViewFormatSettings>
<!-- Currency with 2 decimals for Amount -->
<PivotViewFormatSetting Name="Amount" Format="C2" />
<!-- Integer with grouping separators for Sold -->
<PivotViewFormatSetting Name="Sold" Format="N0" />
</PivotViewFormatSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
GrandTotalsPosition
Gets or sets the position for displaying grand totals in the row and column axes of the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("grandTotalsPosition")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public GrandTotalsPosition GrandTotalsPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| GrandTotalsPosition | A GrandTotalsPosition value specifying where to place grand totals. Available options are Bottom (default) and Top. |
Remarks
Applies to both row and column grand totals, determining whether they appear at the top or bottom of their respective axes.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" GrandTotalsPosition="GrandTotalsPosition.Top">
<!-- Configure other settings -->
</PivotViewDataSourceSettings>
</SfPivotView>
GroupSettings
Gets or sets the collection of group settings that control how fields are grouped based on their data type.
Declaration
[Parameter]
[JsonPropertyName("groupSettings")]
public List<PivotViewGroupSetting> GroupSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewGroupSetting> | A List<T> of PivotViewGroupSetting objects that define grouping rules for date, number, or string fields. The default value is an empty collection. |
Remarks
Date grouping aggregates by intervals such as Years, Quarters, Months, and more. Number grouping creates custom ranges (for example, 1 to 5, 6 to 10). Custom grouping for string fields categorizes members into custom-defined groups.
Grouping affects how headers are generated in the row and column axes and how values are aggregated. Complex or large group definitions may impact initial rendering performance and memory usage.
Applicable only to relational data sources. Provide a non-null collection; assign an empty collection to clear grouping.
As a ParameterAttribute, changing the collection reference triggers a rerender. Mutating items in place may not be detected unless the reference changes or a rerender is requested. Component parameters are not thread-safe; access from the Blazor rendering context.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewGroupSettings>
<!-- Group a date field by Years and Quarters -->
<PivotViewGroupSetting Name="Date" Type="GroupType.Date"
GroupInterval="@(new string[] { "Years", "Quarters" })" />
<!-- Group a numeric field by custom ranges -->
<PivotViewGroupSetting Name="ProductID" Type="GroupType.Number"
GroupInterval="@(new double[] { 1, 5, 10, 15 })" />
</PivotViewGroupSettings>
...
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
LocaleIdentifier
Gets or sets the culture (locale) identifier used to localize the Pivot Table when connected to an OLAP data source.
Declaration
[Parameter]
[JsonPropertyName("localeIdentifier")]
public double LocaleIdentifier { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double representing the Windows Locale Identifier (LCID). The default value is |
Remarks
Applicable only to OLAP data sources (when ProviderType is SSAS). Influences localization of values such as numbers and dates returned by the OLAP engine.
Specify a valid LCID for the desired culture (for example, 1031 for de-DE, 1036 for fr-FR).
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="350">
<PivotViewDataSourceSettings TValue="ProductDetails" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" LocaleIdentifier="1033" EnableSorting="true">
...
</PivotViewDataSourceSettings>
</SfPivotView>
ProviderType
Gets or sets the data provider type used to retrieve and render data for the Pivot Table and Field List.
Declaration
[Parameter]
[JsonPropertyName("providerType")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public ProviderType ProviderType { get; set; }
Property Value
| Type | Description |
|---|---|
| ProviderType | A ProviderType specifying the provider. The default value is Relational. |
Remarks
Choose between relational data (JSON/local/remote via DataManager) and OLAP data (SSAS cube):
- Relational: Renders the Pivot Table using a JSON collection from local or remote sources.
- SSAS: Renders the Pivot Table using OLAP data from an SSAS cube. When selected, properties such as Catalog, Cube, Url, LocaleIdentifier, and Authentication may be required.
Examples
<SfPivotView TValue="ProductDetails" Width="800" Height="350">
<PivotViewDataSourceSettings TValue="ProductDetails" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" LocaleIdentifier="1033" EnableSorting="true"></PivotViewDataSourceSettings>
...
</PivotViewDataSourceSettings>
</SfPivotView>
Roles
Gets or sets the OLAP roles that control access to restricted cube content (such as measures and dimensions). Multiple roles can be specified as a comma-separated list.
Declaration
[Parameter]
[JsonPropertyName("roles")]
public string Roles { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string containing one or more OLAP role names separated by commas (for example, |
Remarks
Applies only to OLAP data sources. Assigned roles determine which secured cube artifacts are accessible, helping protect sensitive data. If no roles are specified, access falls back to the server’s default security context for the current connection.
Ensure that the specified roles exist on the target SSAS instance for the configured Catalog and Cube. Invalid or unknown role names are ignored by the server.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings TValue="ExpandoObject" ProviderType="ProviderType.SSAS" Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Url="https://bi.syncfusion.com/olap/msmdpump.dll" Roles="Role1,Role2" LocaleIdentifier="1033" EnableSorting="true">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
Rows
Specifies the collection of fields to display on the row axis of the Pivot Table. Each item is a PivotViewRow that controls caption, sub-totals, and UI behaviors (filter, sort, remove, edit), among others.
Declaration
[Parameter]
[JsonPropertyName("rows")]
public List<PivotViewRow> Rows { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewRow> | A List<T> of PivotViewRow objects representing row-axis fields. The default value is an empty collection. |
Remarks
The following features are commonly configured per row field:
Name: Field name for row axis display.Caption: Custom label displayed in the UI.ShowNoDataItems: Shows members even when intersections have no data (relational data only).ShowSubTotals: Shows or hides sub-totals for the field.IsNamedSet: Indicates an OLAP named set (OLAP only).IsCalculatedField: Indicates a calculated field (OLAP only).ShowFilterIcon,ShowSortIcon,ShowRemoveIcon,ShowEditIcon: Enables related UI actions.AllowDragAndDrop: Enables or disables dragging the field at runtime.ExpandAll: Expands or collapses headers for the field.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewRows>
<PivotViewRow Name="Country" Caption="Nation" ShowNoDataItems="true" ShowSubTotals="false" />
</PivotViewRows>
<!-- Other configurations -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowAggregationOnValueField
Gets or sets a value indicating whether to display the aggregation type along with the field name in the Pivot buttons for value fields.
Declaration
[Parameter]
[JsonPropertyName("showAggregationOnValueField")]
public bool ShowAggregationOnValueField { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether aggregation details (for example, "Sum of") are shown in the button captions for value fields in the Grouping Bar and Field List UI. The default value is true. |
Remarks
When enabled, value field buttons display the aggregation type for clarity (for example, "Sum of Sold Amount").
Disabling this provides a more streamlined UI by showing only the field name (for example, "Sold Amount").
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowAggregationOnValueField="true">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowColumnGrandTotals
Gets or sets a value indicating whether to display grand totals for columns in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("showColumnGrandTotals")]
public bool ShowColumnGrandTotals { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether column grand totals are visible. The default value is true. |
Remarks
Column grand totals display the aggregated sum across all rows for each column axis field.
Disabling this can reduce visual clutter while maintaining row-based aggregations.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowColumnGrandTotals="true">
<!-- Configure rows, columns, values, and filters -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowColumnGrandTotalsChanged
Gets or sets a callback of the bound value.
Declaration
[Parameter]
public EventCallback<bool> ShowColumnGrandTotalsChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<bool> |
ShowColumnSubTotals
Gets or sets a value indicating whether sub-totals are displayed for fields on the column axis of the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("showColumnSubTotals")]
public bool ShowColumnSubTotals { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether sub-totals are visible for column fields. When true, intermediate calculations are shown for each group in the column axis. The default value is true. |
Remarks
Enable to show partial sums for grouped columns. Disable to simplify the view and reduce visual density.
Examples
To enable sub-totals for columns:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowColumnSubTotals="true">
<!-- Set up rows, columns, values, and other settings -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowColumnSubTotalsChanged
Gets or sets a callback of the bound value.
Declaration
[Parameter]
public EventCallback<bool> ShowColumnSubTotalsChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<bool> |
ShowGrandTotals
Gets or sets a value indicating whether grand totals are displayed for both the row and column axes in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("showGrandTotals")]
public bool ShowGrandTotals { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether grand totals are shown. When true, totals are displayed at the end of rows and columns. The default value is true. |
Remarks
Grand totals add up all values in the Pivot Table for a complete overview.
Disable to focus on detailed group values without overall totals.
Examples
To enable grand totals for both rows and columns:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowGrandTotals="true">
<!-- Set up rows, columns, values, and other settings -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowGrandTotalsChanged
Gets or sets a callback of the bound value.
Declaration
[Parameter]
public EventCallback<bool> ShowGrandTotalsChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<bool> |
ShowHeaderWhenEmpty
Gets or sets a value indicating whether undefined headers are displayed when specific field values are missing in the raw data. For example, if "Country" is "United Kingdom" and "State" is not defined, the header appears as "United Kingdom >> Undefined".
Declaration
[Parameter]
[JsonPropertyName("showHeaderWhenEmpty")]
public bool ShowHeaderWhenEmpty { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether placeholders are shown for missing headers. The default value is true. |
Remarks
When enabled, the Pivot Table preserves hierarchy structure by rendering placeholder headers for members that have no corresponding data in the current slice. This affects header rendering only and does not change aggregations or create data.
Disabling this setting can reduce visual noise by omitting empty groups. It may also slightly improve initial render performance when many empty members exist.
Examples
The following example enables placeholder headers and demonstrates an empty "State" member rendered as "Undefined":
<SfPivotView TValue="OrderRecord" Width="100%" Height="350px">
<PivotViewDataSourceSettings DataSource="@orders" ShowHeaderWhenEmpty="true">
<PivotViewRows>
<PivotViewRow Name="Country" />
<PivotViewRow Name="State" />
</PivotViewRows>
<PivotViewColumns>
<PivotViewColumn Name="Year" />
</PivotViewColumns>
<PivotViewValues>
<PivotViewValue Name="Amount" Caption="Sales Amount" />
</PivotViewValues>
</PivotViewDataSourceSettings>
</SfPivotView>
@code {
Note: One record has State = null (or empty) for Country = "United Kingdom".
private List<OrderRecord> orders = new()
{
new OrderRecord { Country = "United Kingdom", State = null, Year = "2023", Amount = 1200m },
new OrderRecord { Country = "United Kingdom", State = "England", Year = "2023", Amount = 1800m },
new OrderRecord { Country = "France", State = "Île-de-France", Year = "2023", Amount = 1500m },
};
public class OrderRecord
{
public string Country { get; set; }
public string State { get; set; }
public string Year { get; set; }
public decimal Amount { get; set; }
}
}
ShowRowGrandTotals
Gets or sets a value indicating whether grand totals are displayed for the row axis of the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("showRowGrandTotals")]
public bool ShowRowGrandTotals { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether row grand totals are shown. The default value is true. |
Remarks
When enabled, a total is displayed at the end of the row axis to provide an overall aggregate of row data.
Examples
To enable grand totals for rows:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowRowGrandTotals="true">
<!-- Other configurations -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowRowGrandTotalsChanged
Gets or sets a callback of the bound value.
Declaration
[Parameter]
public EventCallback<bool> ShowRowGrandTotalsChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<bool> |
ShowRowSubTotals
Gets or sets a value indicating whether sub-totals are displayed in the row axis of the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("showRowSubTotals")]
public bool ShowRowSubTotals { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether sub-totals are displayed for the row axis. The default value is true. |
Examples
To enable sub-totals for rows:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowRowSubTotals="true">
<!-- Other configurations -->
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
ShowRowSubTotalsChanged
Gets or sets a callback of the bound value.
Declaration
[Parameter]
public EventCallback<bool> ShowRowSubTotalsChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<bool> |
ShowSubTotals
Gets or sets a value indicating whether sub-totals are shown in both row and column axes of the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("showSubTotals")]
public bool ShowSubTotals { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether sub-totals are displayed for both axes. The default value is true. |
Remarks
When enabled, sub-totals appear after each group in the rows and columns, providing intermediate totals for better data analysis.
Examples
To enable sub-totals for both rows and columns:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ShowSubTotals="true">
<!-- Other configurations -->
</PivotViewDataSourceSettings>
</SfPivotView>
ShowSubTotalsChanged
Gets or sets a callback of the bound value.
Declaration
[Parameter]
public EventCallback<bool> ShowSubTotalsChanged { get; set; }
Property Value
| Type |
|---|
| EventCallback<bool> |
SortSettings
Gets or sets the collection of sort settings used to order members in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("sortSettings")]
public List<PivotViewSortSetting> SortSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewSortSetting> | A List<T> containing PivotViewSortSetting objects that specify sort behavior per field. The default value is an empty list. |
Remarks
Sorting applies only when EnableSorting is true.
Use the PivotViewSortSetting property to specify one of the SortOrder values:
- Ascending – sort members in ascending order.
- Descending – sort members in descending order.
- None – disable sorting for the field.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" EnableSorting="true">
<PivotViewSortSettings>
<PivotViewSortSetting Name="Country" Order="Descending" />
</PivotViewSortSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
SubTotalsPosition
Gets or sets the position of sub-totals within header groups for rows and columns in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("subTotalsPosition")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public SubTotalsPosition SubTotalsPosition { get; set; }
Property Value
| Type | Description |
|---|---|
| SubTotalsPosition | A SubTotalsPosition value specifying where sub-totals appear. Options include Auto (default: column sub-totals at the bottom and row sub-totals at the top), Top (sub-totals at the top for both rows and columns), and Bottom (sub-totals at the bottom for both rows and columns). |
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" SubTotalsPosition="SubTotalsPosition.Top">
<!-- Configure other settings -->
</PivotViewDataSourceSettings>
</SfPivotView>
Type
Specifies the format of the bound relational data source used by the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("type")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public DataSourceType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| DataSourceType | A DataSourceType indicating the data source format. The default value is JSON. |
Remarks
This setting applies to relational binding. OLAP connectivity is configured separately using ProviderType (for example, ProviderType.SSAS).
Supported types:
When JSON is selected, bind your strongly typed collection to DataSource.
Column/row/value field names in the report must match the property names of TValue.
Examples
The following example sets the data source type to JSON:
@using Syncfusion.Blazor.PivotView
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" Type="DataSourceType.JSON">
<!-- Configure rows, columns, and values -->
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
Url
Service endpoint URL used by the data source to process requests and retrieve data for rendering the Pivot Table and Field List.
Declaration
[Parameter]
[JsonPropertyName("url")]
public string Url { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string that specifies the service endpoint URL. |
Remarks
This property applies to both the server-side pivot engine and OLAP data sources. Provide a fully qualified HTTP or HTTPS URL.
Examples
The following example sets the service endpoint URL:
@using Syncfusion.Blazor.PivotView
<sfpivotview TValue="ProductDetails">
<PivotViewDataSourceSettings TValue="PivotProductDetails" ExpandAll=false EnableSorting=true Url="https://cdn.syncfusion.com/data/sales-analysis.json" Type=DataSourceType.JSON>
<!-- Configure rows, columns, and values -->
</PivotViewDataSourceSettings>
</sfpivotview>
See Also
ValueAxis
Gets or sets the axis on which value (measure) fields are placed in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("valueAxis")]
public string ValueAxis { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string that specifies the axis for value fields. Allowed values are |
Remarks
This setting changes only the layout/orientation, not the aggregations or calculations.
"column": Each measure appears under the column axis (default). The "Values" header is placed on the Columns axis."row": Each measure appears under the row axis. The "Values" header is placed on the Rows axis.
Examples
Demonstrates placing value fields on the row axis:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data" ValueAxis="row" ShowAggregationOnValueField="true">
<PivotViewRows>
<PivotViewRow Name="Country" />
</PivotViewRows>
<PivotViewColumns>
<PivotViewColumn Name="Year" />
</PivotViewColumns>
<PivotViewValues>
<PivotViewValue Name="Amount" Caption="Sales Amount" />
<PivotViewValue Name="Quantity" Caption="Units Sold" />
</PivotViewValues>
</PivotViewDataSourceSettings>
</SfPivotView>
ValueSortSettings
Gets or sets the settings that control value-based sorting of aggregated values in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("valueSortSettings")]
public PivotViewValueSortSettings ValueSortSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| PivotViewValueSortSettings | A PivotViewValueSortSettings instance specifying:
SortOrder set to None.
|
Remarks
To enable value sorting at runtime, set EnableValueSorting to true.
Value fields reside in the column axis by default; move them to the row axis to sort by row values.
Examples
The following example configures value sorting:
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewValueSortSettings HeaderText="FY 2015##Sold Amount"
HeaderDelimiter="##"
SortOrder="SortOrder.Descending" />
</PivotViewDataSourceSettings>
</SfPivotView>
See Also
Values
Gets or sets the collection of value fields used to display aggregated numeric values in the Pivot Table.
Declaration
[Parameter]
[JsonPropertyName("values")]
public List<PivotViewValue> Values { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PivotViewValue> | A List<T> containing PivotViewValue objects that specify the field name, aggregation type (for example, Sum, Count, Average), and optional base field/item for advanced calculations. The default value is an empty list. |
Remarks
Each PivotViewValue supports:
Name: Field name to be displayed in the value axis.Caption: Custom text for the field button in the Grouping Bar and Field List.Type: Aggregation type (for example, Sum, Count) to apply (relational data only).BaseField/BaseItem: Settings for DifferenceFrom or PercentageOfDifferenceFrom calculations (relational data only).IsCalculatedField: Indicates an OLAP calculated field (OLAP only).ShowRemoveIcon,ShowValueTypeIcon,ShowEditIcon: Icons for runtime field modifications in the UI.AllowDragAndDrop: Restricts dragging of the pivot button to prevent report changes at runtime.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
<PivotViewValues>
<PivotViewValue Name="Sold Amount" Type="SummaryTypes.Sum" />
<PivotViewValue Name="Units Sold" Type="SummaryTypes.Count" />
</PivotViewValues>
</PivotViewDataSourceSettings>
</SfPivotView>
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
ParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected Task ParametersSet()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |