Class PivotViewGroupingBarSettings
Represents configuration settings for customizing the grouping bar UI in the SfPivotView<TValue> component.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class PivotViewGroupingBarSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
The PivotViewGroupingBarSettings class provides options for customizing the grouping bar UI, including UI visibility for specific viewports and pivot button features such as filtering, sorting, changing aggregate types, and removing fields.
The following options are available to customize the grouping bar UI:
- ShowFilterIcon: Shows or hides the filter icon that is displayed on the pivot button of the grouping bar UI. This filter icon is used to filter the members of a particular field at runtime in the pivot table.
- ShowSortIcon: Shows or hides the sort icon that is displayed on the pivot button of the grouping bar UI. This sort icon is used to order members of a particular field either in ascending or descending order at runtime.
- ShowRemoveIcon: Shows or hides the remove icon that is displayed on the pivot button of the grouping bar UI. This remove icon is used to remove fields during runtime.
- ShowValueTypeIcon: Shows or hides the value type icon that is displayed on the pivot button of the grouping bar UI. This value type icon is used to select the appropriate aggregation type for value fields at runtime.
- DisplayMode: Specifies the viewport in which the grouping bar UI is displayed, such as Pivot Table, Pivot Chart, or both table and chart. For example, to show the grouping bar UI only for the Pivot Table, set the property to Table.
- AllowDragAndDrop: Controls whether pivot buttons can be dragged at runtime in the grouping bar UI. This prevents modification of the current report when disabled.
- ShowFieldsPanel: Shows or hides an additional panel alongside the grouping bar UI that lists fields not bound in the current report for drag-and-drop (applicable to relational data sources). This panel enables rearranging pivot buttons across Row, Column, Value, and Filter axes at runtime.
Constructors
PivotViewGroupingBarSettings()
Declaration
public PivotViewGroupingBarSettings()
Properties
AllowDragAndDrop
Gets or sets a value indicating whether pivot buttons can be dragged within the Grouping Bar to rearrange fields at runtime. Set AllowDragAndDrop to false to lock the layout and prevent moving fields between the Row, Column, Value, and Filter axes.
Declaration
[Parameter]
[JsonPropertyName("allowDragAndDrop")]
public bool AllowDragAndDrop { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether drag-and-drop is enabled for pivot buttons. The default value is true. |
Remarks
When enabled, the report layout can be modified by dragging fields across axes in the Grouping Bar. When disabled, the layout remains fixed.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings AllowDragAndDrop="false" />
</SfPivotView>
DisplayMode
Gets or sets the viewport in which the Grouping Bar is displayed.
Declaration
[Parameter]
[JsonPropertyName("displayMode")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public View DisplayMode { get; set; }
Property Value
| Type | Description |
|---|---|
| View | A View specifying the target viewport(s). The default value is Both. |
Remarks
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings DisplayMode="View.Table" />
</SfPivotView>
ShowFieldsPanel
Gets or sets a value indicating whether the Fields Panel is displayed alongside the Grouping Bar. The panel lists unbound fields and supports drag-and-drop to move fields across the Row, Column, Value, and Filter axes.
Declaration
[Parameter]
[JsonPropertyName("showFieldsPanel")]
public bool ShowFieldsPanel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the Fields Panel is visible. The default value is false. |
Remarks
Applicable only for relational data sources.
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings ShowFieldsPanel="true" />
</SfPivotView>
See Also
ShowFilterIcon
Gets or sets a value indicating whether the filter icon is shown on pivot buttons in the Grouping Bar. The icon opens a dialog to include or exclude members of the associated field at runtime.
Declaration
[Parameter]
[JsonPropertyName("showFilterIcon")]
public bool ShowFilterIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the filter icon is visible. The default value is true. |
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings ShowFilterIcon="false" />
</SfPivotView>
See Also
ShowRemoveIcon
Gets or sets a value indicating whether the remove icon is shown on pivot buttons in the Grouping Bar. The icon removes the associated field from its current axis at runtime.
Declaration
[Parameter]
[JsonPropertyName("showRemoveIcon")]
public bool ShowRemoveIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the remove icon is visible. The default value is true. |
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings ShowRemoveIcon="false" />
</SfPivotView>
See Also
ShowSortIcon
Gets or sets a value indicating whether the sort icon is shown on pivot buttons in the Grouping Bar. The icon toggles ascending or descending order for members of the associated field; sorting must be enabled for the field.
Declaration
[Parameter]
[JsonPropertyName("showSortIcon")]
public bool ShowSortIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the sort icon is visible. The default value is true. |
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings ShowSortIcon="false" />
</SfPivotView>
See Also
ShowValueTypeIcon
Gets or sets a value indicating whether the value type icon is shown on pivot buttons in the Grouping Bar.
The icon opens a selector to choose the aggregation type for value fields (for example, Sum, Average, or Count).
Declaration
[Parameter]
[JsonPropertyName("showValueTypeIcon")]
public bool ShowValueTypeIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether the aggregation selector icon is visible. The default value is true. |
Examples
<SfPivotView TValue="ProductDetails">
<PivotViewDataSourceSettings DataSource="@data">
...configure columns, rows, values, filters...
</PivotViewDataSourceSettings>
<PivotViewGroupingBarSettings ShowValueTypeIcon="false" />
</SfPivotView>
Methods
Dispose()
Dispose the unmanaged resources.
Declaration
public virtual void Dispose()
Dispose(bool)
Dispose unmanaged resources in the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
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. |