Example of Selection in Blazor Pivot Table Component
This sample demonstrates different types of grid cell selection options and an event for getting complete information about the selection. The selection of headers, value cells, and summary cells can be done through mouse and keyboard actions.
Grand Total |
---|
Grand Total | No records to display |
Selection Modes:
|
|
Selection Types:
|
|
Selected Values: | |
The selection provides interactive support to highlight rows, columns, values, and summary cells that you select. The selection can be done through either mouse or keyboard interaction. To enable selection, set the AllowSelection property in PivotViewGridSettings to true.
The pivot table supports two types of selection which can be set using the PivotViewSelectionSettings -> Type property in PivotViewGridSettings. They are:
Single
- Enabled by default. Allows the user to select single row or column or cell at a time.Multiple
- Allows the user to select more than one row or column or cell at the same time.
Also, there are three modes of selection which can be set using PivotViewSelectionSettings -> Mode property in PivotViewGridSettings. They are:
Row
- Enabled by default. Enables the complete row selection in a pivot table.Column
- Enables the complete column selection in a pivot table.Cell
- Enables the cell selection in pivot table.Both
- Enables both the row and column selection in pivot table.
To perform multiselection, hold CTRL key and click the desired cells. To select range of cells, hold SHIFT key and click the cells.
While using the pivot table in a touch device environment, tap over a row, column, or other cells. This results in a pop-up with a multiselect icon. Next, tap the icon to proceed with multiselection.
In this demo, pick the selection type and selection mode from the properties panel in order to perform the desired selection process. The selected cell information can be seen in the Event Trace part with the help of the CellSelected event.
More information on the selection feature can be found in this documentation section.