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 | Type | Default |
|---|---|---|---|
AggregateHeaderTemplate |
Custom content for aggregate header cells. |
RenderFragment<PivotGridAggregateHeaderContext<TItem>> | null |
Bordered |
Defines whether table cells have borders. |
bool | true |
CellTemplate |
Custom content for aggregate value cells. |
RenderFragment<PivotGridCellContext<TItem>> | null |
ChildContent |
Defines child content. Field components can be declared directly here. |
RenderFragment | null |
ColumnGroupCaptionMode |
Defines how column group captions are displayed. Possible values: |
PivotGridGroupCaptionMode | PivotGridGroupCaptionMode.Leaf |
ColumnHeaderTemplate |
Custom content for column header cells. |
RenderFragment<PivotGridColumnHeaderContext<TItem>> | null |
ColumnTotalPosition |
Defines column subtotal position. Possible values: |
PivotGridTotalPosition | PivotGridTotalPosition.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. |
RenderFragment | null |
ExpandableColumns |
Enables expanding and collapsing column groups. |
bool | false |
ExpandableRows |
Enables expanding and collapsing row groups. |
bool | true |
FieldChooser |
Enables the runtime field chooser. |
bool | false |
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: |
ThemeContrast | None |
Hoverable |
Defines whether rows show hover styling. |
bool | true |
InitiallyExpanded |
Defines whether expandable groups are expanded on first render. |
bool | true |
Localizers |
Custom localizer handlers to override default PivotGrid localization. |
PivotGridLocalizers | null |
MaxPaginationLinks |
Maximum number of page links visible at once. |
int | 5 |
MissingValuesTemplate |
Custom content shown when no value fields are declared. |
RenderFragment | null |
Narrow |
Defines whether cells use narrow spacing. |
bool | false |
NoDataTemplate |
Custom content shown when there are no data rows. |
RenderFragment | null |
Page |
Currently selected page. |
int | 1 |
PageByGroups |
Defines whether paging is applied to top-level row groups instead of rendered pivot rows. |
bool | false |
PagerSize |
Pager control size. |
Size? | null |
PageSize |
Number of rendered pivot rows per page. |
int | 10 |
PageSizes |
Available page size options. |
IEnumerable<int> | [5, 10, 25, 50, 100] |
Responsive |
Defines whether table is responsive. |
bool | true |
RowGroupCaptionMode |
Defines how row group captions are displayed. Possible values: |
PivotGridGroupCaptionMode | PivotGridGroupCaptionMode.FullPath |
RowHeaderTemplate |
Custom content for row header cells. |
RenderFragment<PivotGridRowHeaderContext<TItem>> | null |
RowTotalPosition |
Defines row subtotal position. Possible values: |
PivotGridTotalPosition | PivotGridTotalPosition.After |
ShowColumnSubtotals |
Shows subtotal columns for column dimensions. |
bool | true |
ShowColumnTotals |
Shows totals for each column as total rows. |
bool | true |
ShowPager |
Shows pager controls for rendered pivot rows. |
bool | false |
ShowPageSizes |
Shows page size selector in the pager. |
bool | false |
ShowRowSubtotals |
Shows subtotal rows for row dimensions. |
bool | true |
ShowRowTotals |
Shows totals for each row as total columns. |
bool | true |
ShowToolbar |
Shows built-in PivotGrid toolbar commands when available. Use ToolbarTemplate for custom toolbar content. |
bool | false |
Striped |
Defines whether rows are striped. |
bool | false |
ToolbarOptions |
Defines options for the built-in toolbar. |
PivotGridToolbarOptions | new() |
ToolbarTemplate |
Custom toolbar content. |
RenderFragment<PivotGridToolbarContext<TItem>> | null |
Virtualize |
Enables virtualized rendering of pivot rows. Ignored when ShowPager is enabled. RemarksWhen 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. |
bool | false |
VirtualizeOptions |
Defines virtualized row rendering options. RemarksThese options tune rendered row virtualization only. They do not change local pivot grouping or aggregate calculation behavior. |
PivotGridVirtualizeOptions | null |
PivotGridField
| Parameter | Description | Type | Default |
|---|---|---|---|
Caption |
Optional caption shown in headers. |
string | |
DisplayFormat |
Specifies display format for default display text. |
string | |
DisplayFormatProvider |
Specifies display format provider. |
IFormatProvider | null |
DisplayTemplate |
Defines custom field value template. |
RenderFragment<PivotGridFieldValueContext<TItem>> | null |
EmptyText |
Text shown when the field value is null. |
string | string.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. |
bool | true |
PivotGridColumn
| Parameter | Description | Type | Default |
|---|---|---|---|
Caption |
Optional caption shown in headers. |
string | |
DisplayFormat |
Specifies display format for default display text. |
string | |
DisplayFormatProvider |
Specifies display format provider. |
IFormatProvider | null |
DisplayTemplate |
Defines custom field value template. |
RenderFragment<PivotGridFieldValueContext<TItem>> | null |
EmptyText |
Text shown when the field value is null. |
string | string.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. |
bool | true |
PivotGridRow
| Parameter | Description | Type | Default |
|---|---|---|---|
Caption |
Optional caption shown in headers. |
string | |
DisplayFormat |
Specifies display format for default display text. |
string | |
DisplayFormatProvider |
Specifies display format provider. |
IFormatProvider | null |
DisplayTemplate |
Defines custom field value template. |
RenderFragment<PivotGridFieldValueContext<TItem>> | null |
EmptyText |
Text shown when the field value is null. |
string | string.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. |
bool | true |
PivotGridAggregate
| Parameter | Description | Type | Default |
|---|---|---|---|
Aggregate |
Defines which built-in aggregate function is used. Possible values: |
PivotGridAggregateFunction | PivotGridAggregateFunction.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. |
IFormatProvider | null |
DisplayTemplate |
Defines custom field value template. |
RenderFragment<PivotGridFieldValueContext<TItem>> | null |
EmptyText |
Text shown when the field value is null. |
string | string.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. |
bool | true |
PivotGridToolbarOptions
| Parameter | Description | Type | Default |
|---|---|---|---|
ShowExpandCollapseButtons |
Gets or sets whether the expand all and collapse all buttons are shown. |
bool | true |
ShowFieldChooserButton |
Gets or sets whether the field chooser button is shown. |
bool | true |
ShowRefreshButton |
Gets or sets whether the refresh button is shown. |
bool | false |
ShowResetLayoutButton |
Gets or sets whether the reset layout button is shown. |
bool | true |
PivotGridVirtualizeOptions
| Parameter | Description | Type | Default |
|---|---|---|---|
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. |
float | 50f |
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. |
int | 10 |
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 | Description | Return | Parameters |
|---|---|---|---|
Reload |
Reloads the PivotGrid data and rebuilds the pivot result. | Task |
PivotGridField
| Method | Description | Return | Parameters |
|---|---|---|---|
FormatValue |
Formats a field value. | string | object value |
GetCaption |
Gets the field caption. | string | |
GetValue |
Gets the field value from the supplied item. | object | TItem item |
PivotGridColumn
| Method | Description | Return | Parameters |
|---|---|---|---|
FormatValue |
Formats a field value. | string | object value |
GetCaption |
Gets the field caption. | string | |
GetValue |
Gets the field value from the supplied item. | object | TItem item |
PivotGridRow
| Method | Description | Return | Parameters |
|---|---|---|---|
FormatValue |
Formats a field value. | string | object value |
GetCaption |
Gets the field caption. | string | |
GetValue |
Gets the field value from the supplied item. | object | TItem item |
PivotGridAggregate
| Method | Description | Return | Parameters |
|---|---|---|---|
Calculate |
Calculates the aggregate value for the supplied source items. | object | IReadOnlyList<TItem> items |
FormatValue |
Formats a field value. | string | object value |
GetCaption |
Gets the field caption. | string | |
GetValue |
Gets the field value from the supplied item. | object | TItem item |