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

ParameterDefaultType
AggregateHeaderTemplatenullRenderFragment<PivotGridAggregateHeaderContext<TItem>>

Custom content for aggregate header cells.
Borderedtruebool

Defines whether table cells have borders.
CellTemplatenullRenderFragment<PivotGridCellContext<TItem>>

Custom content for aggregate value cells.
ChildContentnullRenderFragment

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

Defines how column group captions are displayed.
Possible values:FullPathLeafFieldHidden
ColumnHeaderTemplatenullRenderFragment<PivotGridColumnHeaderContext<TItem>>

Custom content for column header cells.
ColumnTotalPositionAfterPivotGridTotalPosition

Defines column subtotal position.
Possible values:AfterBefore
DatanullIEnumerable<TItem>

Defines the source data to be analyzed.
DataProvidernullIPivotGridDataProvider<TItem>

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

Custom content shown when the pivot result is empty.
ExpandableColumnsfalsebool

Enables expanding and collapsing column groups.
ExpandableRowstruebool

Enables expanding and collapsing row groups.
FieldChooserfalsebool

Enables the runtime field chooser.
GroupCaptionSeparator" / "string

Defines the separator used when group captions show the full path.
HeaderTemplatenullRenderFragment<PivotGridHeaderContext<TItem>>

Custom content for row field header cells.
HeaderThemeContrastNoneThemeContrast

Defines whether header uses theme contrast.
Possible values:NoneLightDark
Hoverabletruebool

Defines whether rows show hover styling.
InitiallyExpandedtruebool

Defines whether expandable groups are expanded on first render.
LocalizersnullPivotGridLocalizers

Custom localizer handlers to override default PivotGrid localization.
MaxPaginationLinks5int

Maximum number of page links visible at once.
MissingValuesTemplatenullRenderFragment

Custom content shown when no value fields are declared.
Narrowfalsebool

Defines whether cells use narrow spacing.
NoDataTemplatenullRenderFragment

Custom content shown when there are no data rows.
Page1int

Currently selected page.
PageByGroupsfalsebool

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

Pager control size.
When omitted, uses Size.Default.
PageSize10int

Number of rendered pivot rows per page.
PageSizes[5, 10, 25, 50, 100]IEnumerable<int>

Available page size options.
Responsivetruebool

Defines whether table is responsive.
RowGroupCaptionModeFullPathPivotGridGroupCaptionMode

Defines how row group captions are displayed.
Possible values:FullPathLeafFieldHidden
RowHeaderTemplatenullRenderFragment<PivotGridRowHeaderContext<TItem>>

Custom content for row header cells.
RowTotalPositionAfterPivotGridTotalPosition

Defines row subtotal position.
Possible values:AfterBefore
ShowColumnSubtotalstruebool

Shows subtotal columns for column dimensions.
ShowColumnTotalstruebool

Shows totals for each column as total rows.
ShowPagerfalsebool

Shows pager controls for rendered pivot rows.
ShowPageSizesfalsebool

Shows page size selector in the pager.
ShowRowSubtotalstruebool

Shows subtotal rows for row dimensions.
ShowRowTotalstruebool

Shows totals for each row as total columns.
ShowToolbarfalsebool

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

Defines whether rows are striped.
ToolbarOptionsnew()PivotGridToolbarOptions

Defines options for the built-in toolbar.
ToolbarTemplatenullRenderFragment<PivotGridToolbarContext<TItem>>

Custom toolbar content.
Virtualizefalsebool

Enables virtualized rendering of pivot rows. Ignored when ShowPager is enabled.
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.
VirtualizeOptionsnullPivotGridVirtualizeOptions

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

PivotGridField

ParameterDefaultType
CaptionFieldstring

Optional caption shown in headers.
DisplayFormat—string

Specifies a direct format specifier or composite format string for the default display text.
DisplayFormatProvidernullIFormatProvider

Specifies display format provider.
DisplayTemplatenullRenderFragment<PivotGridFieldValueContext<TItem>>

Defines custom field value template.
EmptyTextstring.Emptystring

Text shown when the field value is null.
Field—string

Field path bound to this PivotGrid field.
HeaderTemplatenullRenderFragment<PivotGridHeaderContext<TItem>>

Defines custom header template.
Visibletruebool

Determines whether this field participates in the PivotGrid.

PivotGridColumn

ParameterDefaultType
CaptionFieldstring

Optional caption shown in headers.
DisplayFormat—string

Specifies a direct format specifier or composite format string for the default display text.
DisplayFormatProvidernullIFormatProvider

Specifies display format provider.
DisplayTemplatenullRenderFragment<PivotGridFieldValueContext<TItem>>

Defines custom field value template.
EmptyTextstring.Emptystring

Text shown when the field value is null.
Field—string

Field path bound to this PivotGrid field.
HeaderTemplatenullRenderFragment<PivotGridHeaderContext<TItem>>

Defines custom header template.
Visibletruebool

Determines whether this field participates in the PivotGrid.

PivotGridRow

ParameterDefaultType
CaptionFieldstring

Optional caption shown in headers.
DisplayFormat—string

Specifies a direct format specifier or composite format string for the default display text.
DisplayFormatProvidernullIFormatProvider

Specifies display format provider.
DisplayTemplatenullRenderFragment<PivotGridFieldValueContext<TItem>>

Defines custom field value template.
EmptyTextstring.Emptystring

Text shown when the field value is null.
Field—string

Field path bound to this PivotGrid field.
HeaderTemplatenullRenderFragment<PivotGridHeaderContext<TItem>>

Defines custom header template.
Visibletruebool

Determines whether this field participates in the PivotGrid.

PivotGridAggregate

ParameterDefaultType
AggregateSumPivotGridAggregateFunction

Defines which built-in aggregate function is used.
Possible values:CountCountNonNullSumAverageMinMax
CaptionFieldstring

Optional caption shown in headers.
CellTemplatenullRenderFragment<PivotGridCellContext<TItem>>

Defines custom aggregate cell template.
DisplayFormat—string

Specifies a direct format specifier or composite format string for the default display text.
DisplayFormatProvidernullIFormatProvider

Specifies display format provider.
DisplayTemplatenullRenderFragment<PivotGridFieldValueContext<TItem>>

Defines custom field value template.
EmptyTextstring.Emptystring

Text shown when the field value is null.
Field—string

Field path bound to this PivotGrid field.
HeaderTemplatenullRenderFragment<PivotGridHeaderContext<TItem>>

Defines custom header template.
Visibletruebool

Determines whether this field participates in the PivotGrid.

PivotGridToolbarOptions

ParameterDefaultType
ShowExpandCollapseButtonstruebool

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

Gets or sets whether the field chooser button is shown.
ShowRefreshButtonfalsebool

Gets or sets whether the refresh button is shown.
ShowResetLayoutButtontruebool

Gets or sets whether the reset layout button is shown.

PivotGridVirtualizeOptions

ParameterDefaultType
Height"500px"string

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

Gets or sets the expected virtualized item size in pixels.
MaxHeight"500px"string

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

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

Events

PivotGrid

EventType
CellClickedEventCallback<PivotGridCellClickedEventArgs<TItem>>

Occurs when an aggregate cell is clicked.
CellStylingAction<PivotGridCellContext<TItem>, PivotGridCellStyling>

Custom styling for aggregate value cells.
ColumnHeaderStylingAction<PivotGridColumnHeaderContext<TItem>, PivotGridCellStyling>

Custom styling for column header cells.
PageChangedEventCallback<int>

Occurs after the page has changed.
PageSizeChangedEventCallback<int>

Occurs after the page size has changed.
ReadDataEventCallback<PivotGridReadDataEventArgs<TItem>>

Occurs when the pivot grid requests data from an external provider. Ignored when DataProvider is assigned.
RowHeaderStylingAction<PivotGridRowHeaderContext<TItem>, PivotGridCellStyling>

Custom styling for row header cells.

PivotGridAggregate

EventType
AggregatorFunc<IReadOnlyList<TItem>, object>

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

Methods

PivotGrid

MethodReturnParameters
ReloadTask—

Reloads the PivotGrid data and rebuilds the pivot result.

PivotGridField

MethodReturnParameters
FormatValuestringobject value

Formats a field value.
GetCaptionstring—

Gets the field caption.
GetValueobjectTItem item

Gets the field value from the supplied item.

PivotGridColumn

MethodReturnParameters
FormatValuestringobject value

Formats a field value.
GetCaptionstring—

Gets the field caption.
GetValueobjectTItem item

Gets the field value from the supplied item.

PivotGridRow

MethodReturnParameters
FormatValuestringobject value

Formats a field value.
GetCaptionstring—

Gets the field caption.
GetValueobjectTItem item

Gets the field value from the supplied item.

PivotGridAggregate

MethodReturnParameters
CalculateobjectIReadOnlyList<TItem> items

Calculates the aggregate value for the supplied source items.
FormatValuestringobject value

Formats a field value.
GetCaptionstring—

Gets the field caption.
GetValueobjectTItem item

Gets the field value from the supplied item.