alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class PivotViewSelectionSettings

    Specifies selection options for the pivot table, including selection mode, cell selection mode, selection type, checkbox behaviors, persistence, and simple multi-row selection.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    PivotViewSelectionSettings
    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
    Namespace: Syncfusion.Blazor.PivotView
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PivotViewSelectionSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    The following options configure selection behavior:

    • Mode — Determines whether selection targets rows, columns, both and cells. Use Column to target columns.
    • CellSelectionMode — Controls how ranges of cells are selected. For example, use Box to select a rectangular cell region.
    • Type — Specifies the selection type; use Multiple to enable multiple selections.
    • CheckboxOnly and CheckboxMode — Configure checkbox-based selection and checkbox selection behavior.
    • PersistSelection — When enabled, selection state is retained across operations (requires a primary key column configured with Columns.isPrimaryKey).
    • EnableSimpleMultiRowSelection — Enables selecting multiple rows with single clicks without using SHIFT or CTRL modifiers.

    Constructors

    PivotViewSelectionSettings()

    Declaration
    public PivotViewSelectionSettings()

    Properties

    CellSelectionMode

    Gets or sets the mode used to select cells in the Pivot Table.To set the cell selection mode, use the PivotCellSelectionMode option within the PivotViewSelectionSettings class. The available modes are:

    Declaration
    [Parameter]
    [JsonPropertyName("cellSelectionMode")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public PivotCellSelectionMode CellSelectionMode { get; set; }
    Property Value
    Type Description
    PivotCellSelectionMode

    A PivotCellSelectionMode that specifies how cell ranges are highlighted. The default value is Flow.

    Remarks
    • Flow: Selects from the start cell to the end cell, including all cells in between across rows.
    • Box: Selects a rectangular range defined by starting and ending row/column indices.
    • BoxWithBorder: Same as Box with visible borders around the selected range.
    Examples

    The following example sets the cell selection mode to Box:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings AllowSelection="true">
        <SelectionSettings CellSelectionMode="PivotCellSelectionMode.Box" Type="PivotTableSelectionType.Multiple" Mode="SelectionMode.Cell" />
      </PivotViewGridSettings>
    </SfPivotView>

    CheckboxMode

    Gets or sets the checkbox selection behavior applied to rows in the Pivot Table.

    Declaration
    [Parameter]
    [JsonPropertyName("checkboxMode")]
    public PivotTableCheckboxSelectionType CheckboxMode { get; set; }
    Property Value
    Type Description
    PivotTableCheckboxSelectionType

    A PivotTableCheckboxSelectionType that specifies checkbox selection behavior. The default value is Default.

    Remarks
    • Default: Allows selecting multiple rows one by one.
    • ResetOnRowClick: Resets the previous selection when a new row is clicked. Multiple rows can still be selected using CTRL or SHIFT.
    Examples

    The following example enables default checkbox selection:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings AllowSelection="true">
        <SelectionSettings CheckboxMode="PivotTableCheckboxSelectionType.Default" />
      </PivotViewGridSettings>
    </SfPivotView>

    CheckboxOnly

    Gets or sets a value indicating whether row selection can be toggled using checkboxes only.

    Declaration
    [Parameter]
    [JsonPropertyName("checkboxOnly")]
    public bool CheckboxOnly { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating whether checkbox-only row selection is enabled. The default value is false.

    Remarks

    To use checkbox-only selection, ensure a checkbox column is configured in the underlying grid.

    Examples

    The following example enables checkbox-only selection:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings AllowSelection="true">
        <SelectionSettings CheckboxOnly="true" />
      </PivotViewGridSettings>
    </SfPivotView>

    EnableSimpleMultiRowSelection

    Gets or sets a value indicating whether multiple rows can be selected with single clicks without using SHIFT or CTRL.

    Declaration
    [Parameter]
    [JsonPropertyName("enableSimpleMultiRowSelection")]
    public bool EnableSimpleMultiRowSelection { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating whether simple multi-row selection is enabled. The default value is false.

    Remarks

    When enabled, each click toggles the selection state of a row; modifier keys are not required to select multiple rows.

    Examples

    The following example enables simple multi-row selection:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings AllowSelection="true">
        <SelectionSettings EnableSimpleMultiRowSelection="true" />
      </PivotViewGridSettings>
    </SfPivotView>

    Mode

    Gets or sets the selection scope for the Pivot Table.

    Declaration
    [Parameter]
    [JsonPropertyName("mode")]
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public SelectionMode Mode { get; set; }
    Property Value
    Type Description
    SelectionMode

    A SelectionMode that specifies whether selection targets cells, rows, columns, or both. The default value is Row.

    Remarks
    • Cell: Selects individual cells.
    • Row: Selects entire rows.
    • Column: Selects entire columns.
    • Both: Allows selection of rows, columns, and cells.
    Examples

    The following example sets selection mode to Column:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings AllowSelection="true">
        <SelectionSettings Mode="SelectionMode.Column" />
      </PivotViewGridSettings>
    </SfPivotView>

    PersistSelection

    Gets or sets a value indicating whether row, column, or cell selections persist across data operations.

    Declaration
    [Parameter]
    [JsonPropertyName("persistSelection")]
    public bool PersistSelection { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating whether selection persists after operations such as sorting or paging. The default value is false.

    Remarks

    To persist selections, ensure at least one column is configured as a primary key in the underlying grid.

    Examples

    The following example enables persisted selection:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings>
        <SelectionSettings PersistSelection="true" />
      </PivotViewGridSettings>
    </SfPivotView>

    Type

    Gets or sets the selection type that determines whether a single or multiple targets can be selected at once.

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

    A PivotTableSelectionType specifying the selection type. The default value is Single unless otherwise set by the parent grid.

    Remarks
    • Single: Selects one row/column/cell at a time.
    • Multiple: Allows selecting multiple rows/columns/cells.
    Examples

    The following example enables multiple selection:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
      <PivotViewDataSourceSettings DataSource="@data" />
      <PivotViewGridSettings>
        <SelectionSettings Type="PivotTableSelectionType.Multiple" />
      </PivotViewGridSettings>
    </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