alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class PivotValueSortSettings

    Provides options to sort individual value fields and their aggregated values along the row or column axis in ascending or descending order.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    PivotValueSortSettings
    PivotFieldListValueSortSettings
    PivotViewValueSortSettings
    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.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    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.Dispose(bool)
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.PivotView
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PivotValueSortSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    PivotValueSortSettings()

    Declaration
    public PivotValueSortSettings()

    Properties

    ColumnHeaderText

    Gets or sets the header text of the column field for which value-based sorting is applied.

    Declaration
    [Parameter]
    [JsonPropertyName("columnHeaderText")]
    public string ColumnHeaderText { get; set; }
    Property Value
    Type
    string
    Remarks

    This property is applicable only for relational data sources. For example, set this property to "FY 2018.Units Sold" to sort the values corresponding to that column field. Ensure that EnableValueSorting is set to true in either the SfPivotView or SfPivotFieldList component.

    Examples

    The following example demonstrates how to use the ColumnHeaderText property in the SfPivotView component:

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ProductDetails" EnableValueSorting="true">
        <PivotViewDataSourceSettings DataSource="@dataSource">
            <PivotViewColumns>
                <PivotViewColumn Name="Year"></PivotViewColumn>
            </PivotViewColumns>
            <PivotViewValues>
                <PivotViewValue Name="Sold" Caption="Units Sold"></PivotViewValue>
                <PivotViewValue Name="Amount" Caption="Sold Amount"></PivotViewValue>
            </PivotViewValues>
            <PivotViewValueSortSettings ColumnHeaderText="FY 2018.Units Sold" ColumnSortOrder="Sorting.Descending"></PivotViewValueSortSettings>
        </PivotViewDataSourceSettings>
    </SfPivotView>

    The following example demonstrates usage in the SfPivotFieldList component:

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotFieldList TValue="ProductDetails" EnableValueSorting="true">
        <PivotFieldListDataSourceSettings DataSource="@dataSource">
            <PivotFieldListColumns>
                <PivotFieldListColumn Name="Year"></PivotFieldListColumn>
            </PivotFieldListColumns>
            <PivotFieldListValues>
                <PivotFieldListValue Name="Sold" Caption="Units Sold"></PivotFieldListValue>
                <PivotFieldListValue Name="Amount" Caption="Sold Amount"></PivotFieldListValue>
            </PivotFieldListValues>
            <PivotFieldListValueSortSettings ColumnHeaderText="FY 2018.Units Sold" ColumnSortOrder="Sorting.Descending"></PivotFieldListValueSortSettings>
        </PivotFieldListDataSourceSettings>
    </SfPivotFieldList>

    ColumnSortOrder

    Gets or sets the sort order to apply for the specified column field.

    Declaration
    [Parameter]
    [JsonPropertyName("columnSortOrder")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public Sorting ColumnSortOrder { get; set; }
    Property Value
    Type Description
    Sorting

    A Sorting enum value indicating the sort direction:

    • Ascending - Sorts in ascending order.
    • Descending - Sorts in descending order.
    • None - No sorting is applied.
    Remarks

    Only supported in relational data sources. Use string values like "Sorting.Descending" in Razor syntax due to enum serialization. Ensure EnableValueSorting is enabled.

    Examples

    See ColumnHeaderText example for code samples using this property.

    HeaderDelimiter

    It allows to set the delimiter, which is used a separator to split the given header text.

    Declaration
    [Parameter]
    [JsonPropertyName("headerDelimiter")]
    public string HeaderDelimiter { get; set; }
    Property Value
    Type
    string

    HeaderText

    It allows to set the member name of a specific field for value sorting.

    It is applicable only for OLAP data source. For relational data source use ColumnHeaderText and RowHeaderText properties.

    Declaration
    [Parameter]
    [JsonPropertyName("headerText")]
    public string HeaderText { get; set; }
    Property Value
    Type
    string

    Measure

    It allows to set the measure name to achieve value sorting based on this.

    Declaration
    [Parameter]
    [JsonPropertyName("measure")]
    public string Measure { get; set; }
    Property Value
    Type
    string

    RowHeaderText

    Gets or sets the header text of the row field for which value-based sorting is applied.

    Declaration
    [Parameter]
    [JsonPropertyName("rowHeaderText")]
    public string RowHeaderText { get; set; }
    Property Value
    Type
    string
    Remarks

    This property is applicable only for relational data sources. For example, set this property to "Germany" to sort the values corresponding to that row field. Ensure that EnableValueSorting is set to true in either the SfPivotView or SfPivotFieldList component.

    Examples

    The following example demonstrates how to use the RowHeaderText property in the SfPivotView component:

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ProductDetails" EnableValueSorting="true">
        <PivotViewDataSourceSettings DataSource="@dataSource">
            <PivotViewRows>
                <PivotViewRow Name="Country"></PivotViewRow>
            </PivotViewRows>
            <PivotViewValueSortSettings RowHeaderText="Germany" RowSortOrder="Sorting.Ascending"></PivotViewValueSortSettings>
        </PivotViewDataSourceSettings>
    </SfPivotView>

    The following example demonstrates usage in the SfPivotFieldList component:

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotFieldList TValue="ProductDetails" EnableValueSorting="true">
        <PivotFieldListDataSourceSettings DataSource="@dataSource">
            <PivotFieldListRows>
                <PivotFieldListRow Name="Country"></PivotFieldListRow>
            </PivotFieldListRows>
            <PivotFieldListValueSortSettings RowHeaderText="Germany" RowSortOrder="Sorting.Ascending"></PivotFieldListValueSortSettings>
        </PivotFieldListDataSourceSettings>
    </SfPivotFieldList>

    RowSortOrder

    Gets or sets the sort order to apply for the specified row field.

    Declaration
    [Parameter]
    [JsonPropertyName("rowSortOrder")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public Sorting RowSortOrder { get; set; }
    Property Value
    Type Description
    Sorting

    A Sorting enum value indicating the sort direction:

    • Ascending - Sorts in ascending order.
    • Descending - Sorts in descending order.
    • None - No sorting is applied.
    Remarks

    Only supported in relational data sources. Use string values like "Sorting.Ascending" in Razor syntax due to enum serialization. Ensure EnableValueSorting is enabled.

    Examples

    See RowHeaderText example for code samples using this property.

    SortOrder

    Allows to apply sorting to the specified field either by ascending or descending. The types are, Ascending: It allows to display the field members in ascending order. Descending: It allows to display the field members in descending order.

    It is applicable only for OLAP data source. For relational data source use ColumnSortOrder and RowSortOrder properties.

    Declaration
    [Parameter]
    [JsonPropertyName("sortOrder")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public Sorting SortOrder { get; set; }
    Property Value
    Type
    Sorting

    Implements

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