Blazorise Pivot Grid API

Explore the Blazorise Pivot Grid API reference for parameters, events, methods, and related types.

For examples and usage guidance, see the Pivot Grid documentation.

API

Parameters

PivotGrid

Parameter Description TypeDefault
AggregateHeaderTemplate

Custom content for aggregate header cells.

RenderFragment<PivotGridAggregateHeaderContext<TItem>>null
Bordered

Defines whether table cells have borders.

booltrue
CellTemplate

Custom content for aggregate value cells.

RenderFragment<PivotGridCellContext<TItem>>null
ChildContent

Defines child content. Field components can be declared directly here.

RenderFragmentnull
ColumnGroupCaptionMode

Defines how column group captions are displayed.

Possible values:FullPath, Leaf, Field, Hidden

PivotGridGroupCaptionModePivotGridGroupCaptionMode.Leaf
ColumnHeaderTemplate

Custom content for column header cells.

RenderFragment<PivotGridColumnHeaderContext<TItem>>null
ColumnTotalPosition

Defines column subtotal position.

Possible values:After, Before

PivotGridTotalPositionPivotGridTotalPosition.After
Data

Defines the source data to be analyzed.

IEnumerable<TItem>null
DataProvider

Defines an external data provider used to read pivot grid data. When assigned, it has priority over ReadData and Data.

IPivotGridDataProvider<TItem>null
EmptyTemplate

Custom content shown when the pivot result is empty.

RenderFragmentnull
ExpandableColumns

Enables expanding and collapsing column groups.

boolfalse
ExpandableRows

Enables expanding and collapsing row groups.

booltrue
FieldChooser

Enables the runtime field chooser.

boolfalse
GroupCaptionSeparator

Defines the separator used when group captions show the full path.

string" / "
HeaderTemplate

Custom content for row field header cells.

RenderFragment<PivotGridHeaderContext<TItem>>null
HeaderThemeContrast

Defines whether header uses theme contrast.

Possible values:None, Light, Dark

ThemeContrastNone
Hoverable

Defines whether rows show hover styling.

booltrue
InitiallyExpanded

Defines whether expandable groups are expanded on first render.

booltrue
Localizers

Custom localizer handlers to override default PivotGrid localization.

PivotGridLocalizersnull
MaxPaginationLinks

Maximum number of page links visible at once.

int5
MissingValuesTemplate

Custom content shown when no value fields are declared.

RenderFragmentnull
Narrow

Defines whether cells use narrow spacing.

boolfalse
NoDataTemplate

Custom content shown when there are no data rows.

RenderFragmentnull
Page

Currently selected page.

int1
PageByGroups

Defines whether paging is applied to top-level row groups instead of rendered pivot rows.

boolfalse
PagerSize

Pager control size.

Size?null
PageSize

Number of rendered pivot rows per page.

int10
PageSizes

Available page size options.

IEnumerable<int>[5, 10, 25, 50, 100]
Responsive

Defines whether table is responsive.

booltrue
RowGroupCaptionMode

Defines how row group captions are displayed.

Possible values:FullPath, Leaf, Field, Hidden

PivotGridGroupCaptionModePivotGridGroupCaptionMode.FullPath
RowHeaderTemplate

Custom content for row header cells.

RenderFragment<PivotGridRowHeaderContext<TItem>>null
RowTotalPosition

Defines row subtotal position.

Possible values:After, Before

PivotGridTotalPositionPivotGridTotalPosition.After
ShowColumnSubtotals

Shows subtotal columns for column dimensions.

booltrue
ShowColumnTotals

Shows totals for each column as total rows.

booltrue
ShowPager

Shows pager controls for rendered pivot rows.

boolfalse
ShowPageSizes

Shows page size selector in the pager.

boolfalse
ShowRowSubtotals

Shows subtotal rows for row dimensions.

booltrue
ShowRowTotals

Shows totals for each row as total columns.

booltrue
ShowToolbar

Shows built-in PivotGrid toolbar commands when available. Use ToolbarTemplate for custom toolbar content.

boolfalse
Striped

Defines whether rows are striped.

boolfalse
ToolbarOptions

Defines options for the built-in toolbar.

PivotGridToolbarOptionsnew()
ToolbarTemplate

Custom toolbar content.

RenderFragment<PivotGridToolbarContext<TItem>>null
Virtualize

Enables virtualized rendering of pivot rows. Ignored when ShowPager is enabled.

Remarks

When local Data is used, virtualization reduces rendered rows only; the full pivot result is still computed before rendering. For large remote datasets, use ReadData or DataProvider with Virtualize and return prepared Result rows for the requested range.

boolfalse
VirtualizeOptions

Defines virtualized row rendering options.

Remarks

These options tune rendered row virtualization only. They do not change local pivot grouping or aggregate calculation behavior.

PivotGridVirtualizeOptionsnull

PivotGridField

Parameter Description TypeDefault
Caption

Optional caption shown in headers.

string
DisplayFormat

Specifies display format for default display text.

string
DisplayFormatProvider

Specifies display format provider.

IFormatProvidernull
DisplayTemplate

Defines custom field value template.

RenderFragment<PivotGridFieldValueContext<TItem>>null
EmptyText

Text shown when the field value is null.

stringstring.Empty
Field

Field path bound to this PivotGrid field.

string
HeaderTemplate

Defines custom header template.

RenderFragment<PivotGridHeaderContext<TItem>>null
Visible

Determines whether this field participates in the PivotGrid.

booltrue

PivotGridColumn

Parameter Description TypeDefault
Caption

Optional caption shown in headers.

string
DisplayFormat

Specifies display format for default display text.

string
DisplayFormatProvider

Specifies display format provider.

IFormatProvidernull
DisplayTemplate

Defines custom field value template.

RenderFragment<PivotGridFieldValueContext<TItem>>null
EmptyText

Text shown when the field value is null.

stringstring.Empty
Field

Field path bound to this PivotGrid field.

string
HeaderTemplate

Defines custom header template.

RenderFragment<PivotGridHeaderContext<TItem>>null
Visible

Determines whether this field participates in the PivotGrid.

booltrue

PivotGridRow

Parameter Description TypeDefault
Caption

Optional caption shown in headers.

string
DisplayFormat

Specifies display format for default display text.

string
DisplayFormatProvider

Specifies display format provider.

IFormatProvidernull
DisplayTemplate

Defines custom field value template.

RenderFragment<PivotGridFieldValueContext<TItem>>null
EmptyText

Text shown when the field value is null.

stringstring.Empty
Field

Field path bound to this PivotGrid field.

string
HeaderTemplate

Defines custom header template.

RenderFragment<PivotGridHeaderContext<TItem>>null
Visible

Determines whether this field participates in the PivotGrid.

booltrue

PivotGridAggregate

Parameter Description TypeDefault
Aggregate

Defines which built-in aggregate function is used.

Possible values:Count, CountNonNull, Sum, Average, Min, Max

PivotGridAggregateFunctionPivotGridAggregateFunction.Sum
Caption

Optional caption shown in headers.

string
CellTemplate

Defines custom aggregate cell template.

RenderFragment<PivotGridCellContext<TItem>>null
DisplayFormat

Specifies display format for default display text.

string
DisplayFormatProvider

Specifies display format provider.

IFormatProvidernull
DisplayTemplate

Defines custom field value template.

RenderFragment<PivotGridFieldValueContext<TItem>>null
EmptyText

Text shown when the field value is null.

stringstring.Empty
Field

Field path bound to this PivotGrid field.

string
HeaderTemplate

Defines custom header template.

RenderFragment<PivotGridHeaderContext<TItem>>null
Visible

Determines whether this field participates in the PivotGrid.

booltrue

PivotGridToolbarOptions

Parameter Description TypeDefault
ShowExpandCollapseButtons

Gets or sets whether the expand all and collapse all buttons are shown.

booltrue
ShowFieldChooserButton

Gets or sets whether the field chooser button is shown.

booltrue
ShowRefreshButton

Gets or sets whether the refresh button is shown.

boolfalse
ShowResetLayoutButton

Gets or sets whether the reset layout button is shown.

booltrue

PivotGridVirtualizeOptions

Parameter Description TypeDefault
Height

Gets or sets the PivotGrid table container height when virtualization is enabled.

string"500px"
ItemSize

Gets or sets the expected virtualized item size in pixels.

float50f
MaxHeight

Gets or sets the PivotGrid table container maximum height when virtualization is enabled.

string"500px"
OverscanCount

Gets or sets how many additional items will be rendered before and after the visible region.

int10

Events

PivotGrid

Event Description Type
CellClicked

Occurs when an aggregate cell is clicked.

EventCallback<PivotGridCellClickedEventArgs<TItem>>
CellStyling

Custom styling for aggregate value cells.

Action<PivotGridCellContext<TItem>, PivotGridCellStyling>
ColumnHeaderStyling

Custom styling for column header cells.

Action<PivotGridColumnHeaderContext<TItem>, PivotGridCellStyling>
PageChanged

Occurs after the page has changed.

EventCallback<int>
PageSizeChanged

Occurs after the page size has changed.

EventCallback<int>
ReadData

Occurs when the pivot grid requests data from an external provider. Ignored when DataProvider is assigned.

EventCallback<PivotGridReadDataEventArgs<TItem>>
RowHeaderStyling

Custom styling for row header cells.

Action<PivotGridRowHeaderContext<TItem>, PivotGridCellStyling>

PivotGridAggregate

Event Description Type
Aggregator

Defines a custom aggregate function. When set, it takes precedence over Aggregate.

Func<IReadOnlyList<TItem>, object>

Methods

PivotGrid

Method DescriptionReturnParameters
Reload Reloads the PivotGrid data and rebuilds the pivot result. Task

PivotGridField

Method DescriptionReturnParameters
FormatValue Formats a field value. stringobject value
GetCaption Gets the field caption. string
GetValue Gets the field value from the supplied item. objectTItem item

PivotGridColumn

Method DescriptionReturnParameters
FormatValue Formats a field value. stringobject value
GetCaption Gets the field caption. string
GetValue Gets the field value from the supplied item. objectTItem item

PivotGridRow

Method DescriptionReturnParameters
FormatValue Formats a field value. stringobject value
GetCaption Gets the field caption. string
GetValue Gets the field value from the supplied item. objectTItem item

PivotGridAggregate

Method DescriptionReturnParameters
Calculate Calculates the aggregate value for the supplied source items. objectIReadOnlyList<TItem> items
FormatValue Formats a field value. stringobject value
GetCaption Gets the field caption. string
GetValue Gets the field value from the supplied item. objectTItem item
On this page