Class PivotViewFieldMapping
Represents the field mapping configuration used by the PivotView component to define how data fields appear and behave in the Pivot Table.
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class PivotViewFieldMapping : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
Field mapping configures fields that are not part of the initial pivot report. When a field exists in both the initial report and the field mapping, the initial report settings take precedence.
Use the FieldMapping property on PivotViewDataSourceSettings<TValue> to customize display names, data types, aggregation behavior, and UI interactions without modifying the underlying data source.
The following options are available for field mapping:
Field identification and display
Name- Specifies the field name from the data source.Caption- Sets a user-friendly display name used in the Pivot Table UI instead of the original field name.DataType- Specifies the field data type such asstring,number,datetime,date, orboolean.
Aggregation and calculation
Type- Defines how values are aggregated (relational data only), such as sum, product, count, average, minimum, or maximum. Default: sum.BaseField- Specifies the comparison field for aggregate types such asDifferenceFrom,PercentageOfDifferenceFrom, orPercentageOfParentTotal.BaseItem- Specifies the comparison member within a field for the above aggregate types.
Field positioning and behavior
Axis- Determines where the field appears (row, column, value, or filter axis).ShowNoDataItems- Shows all field members even when no data exists at row/column intersections. Default: false (relational data only).ShowSubTotals- Controls the visibility of subtotals for the field in row and column axes. Default: true.
OLAP-specific options
IsNamedSet- Indicates whether the field is a Named Set in the SSAS OLAP cube. Default: false (OLAP only).IsCalculatedField- Indicates whether the field is a calculated field defined with a formula. Default: false (OLAP only).
UI interaction controls
ShowFilterIcon- Controls the visibility of the filter icon on field buttons in the Grouping Bar and Field List. Default: true.ShowSortIcon- Controls the visibility of the sort icon on field buttons in the Grouping Bar and Field List. Default: true.ShowRemoveIcon- Controls the visibility of the remove icon on field buttons in the Grouping Bar and Field List. Default: true.ShowValueTypeIcon- Controls the visibility of the value type icon on field buttons for changing aggregation at runtime. Default: true.ShowEditIcon- Controls the visibility of the edit icon on field buttons for modifying calculated field caption, formula, and format. Default: true.AllowDragAndDrop- Controls whether field buttons can be dragged in the Grouping Bar and Field List. When false, the current report structure cannot be modified. Default: true.
Constructors
PivotViewFieldMapping()
Declaration
public PivotViewFieldMapping()
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Dispose(bool)
Dispose unmanaged resources in the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
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. |