alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class PivotViewField

    Represents field-level configuration options for fields in the SfPivotView<TValue> component's field list.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    PivotFieldOptions
    PivotViewField
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    PivotFieldOptions.AllowDragAndDrop
    PivotFieldOptions.Axis
    PivotFieldOptions.BaseField
    PivotFieldOptions.BaseItem
    PivotFieldOptions.Caption
    PivotFieldOptions.ExpandAll
    PivotFieldOptions.IsCalculatedField
    PivotFieldOptions.IsNamedSet
    PivotFieldOptions.Name
    PivotFieldOptions.ShowEditIcon
    PivotFieldOptions.ShowFilterIcon
    PivotFieldOptions.ShowNoDataItems
    PivotFieldOptions.ShowRemoveIcon
    PivotFieldOptions.ShowSortIcon
    PivotFieldOptions.ShowSubTotals
    PivotFieldOptions.ShowValueTypeIcon
    PivotFieldOptions.Type
    Namespace: Syncfusion.Blazor.PivotView
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PivotViewField : PivotFieldOptions, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    The PivotViewField class defines configuration settings for individual fields that can be used when creating the field list in the pivot table. Each field configuration specifies how the field should appear and behave in the grouping bar and field list UI, including display properties, interaction features, and data characteristics.

    The following configurations are applicable for field-level settings:

    • Name: Specifies the field name that will be configured when creating the field list.
    • Caption: Specifies the caption for the specific field. The caption will be used to display instead of the field name in the pivot table component's UI.
    • ShowNoDataItems: Displays all member items of a specific field in the pivot table, even when no data exists in the row/column intersection in the data source. Note: Applicable only for relational data sources.
    • ShowSubTotals: Shows or hides sub-totals for a specific field in the row axis of the pivot table.
    • IsNamedSet: Specifies whether the field is a named set or not. In general, the named set is a set of dimension members or a set expression (MDX query) to be created as a dimension in the SSAS OLAP cube itself. Note: Applicable only for OLAP data sources.
    • IsCalculatedField: Specifies whether the field is a calculated field or not. In general, the calculated field is created from the bound data source or using simple formulas with basic arithmetic operators in the pivot table. Note: Applicable only for OLAP data sources.
    • ShowFilterIcon: Shows or hides the filter icon of a specific field that is displayed on the pivot button of the grouping bar and field list UI. This filter icon is used to filter the members of a specified field at runtime in the pivot table.
    • ShowSortIcon: Shows or hides the sort icon of a specific field that is displayed in the pivot button of the grouping bar and field list UI. This sort icon is used to order members of a specified field either in ascending or descending order at runtime.
    • ShowRemoveIcon: Shows or hides the remove icon of a specific field that is displayed in the pivot button of the grouping bar and field list UI. This remove icon is used to remove the specified field during runtime.
    • ShowEditIcon: Shows or hides the edit icon of a specific field that is displayed on the pivot button of the grouping bar and field list UI. This edit icon is used to modify the caption, formula, and format of a specified calculated field at runtime that is displayed in the pivot table.
    • AllowDragAndDrop: Restricts the specific field's pivot button from being dragged at runtime in the grouping bar and field list UI. This prevents modification of the current report.
    • ExpandAll: Expands or collapses all of the pivot table's headers for a specific field.

    Constructors

    PivotViewField()

    Declaration
    public PivotViewField()

    Properties

    DataType

    Gets or sets the data type for the specified field used by the Pivot Table for formatting, sorting, and grouping.

    Declaration
    [Parameter]
    [JsonPropertyName("dataType")]
    public string DataType { get; set; }
    Property Value
    Type Description
    string

    A string indicating the field’s data type. Common values include "String", "Number", "Date", "DateTime", and "Boolean". The default value is Empty.

    Remarks

    The data type influences number/date formatting, comparison semantics, and aggregations applied to the field.

    Values are case-insensitive. If set to an unrecognized value, the field is treated as text.

    When left as Empty, behavior may depend on the data source and bindings (for example, type inference may occur).

    Examples

    The following example specifies a data type for a field:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data">
         <PivotViewFieldMapping>
            <PivotViewField Name="rank_display" DataType="number"></PivotViewField>
         </PivotViewFieldMapping>
      </PivotViewDataSourceSettings>
    </SfPivotView>

    Methods

    Dispose(bool)

    Dispose unmanaged resources in the component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    OwningComponentBase.Dispose(bool)

    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
    ComponentBase.OnInitializedAsync()

    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
    ComponentBase.OnParametersSetAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved