Example of Selection in ASP.NET Core Pivot Table Control
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.
Selection Modes:
|
|
Selection Types:
|
|
Event Trace: |
|
|
This feature provides interactive support to highlight rows, columns, values, and summary cells that you select.
Selection can be done through either mouse or keyboard interaction. To enable selection, set
allowSelection
as true.
The pivot table supports two types of selection that can be set using
selectionSettings.type
property. They are,
-
Single
- Enabled by default. Allows user to select a single row, column, or cell at a time. Multiple
- Allows the user to select more than one row, column, or cell at the same time.
Also, there are three modes of selection that can be set using
selectionSettings.mode
property. 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 only value and summary cell selection in a pivot table.Both
- Enables both row and column selection in a pivot table.
To perform multiselection, hold the CTRL key and click the desired cells. To select a range of cells, hold the SHIFT key and click the cells.
While using pivot table in a touch device, double-tap over a row, column, or other cells. This results in a pop-up with a multiselect icon. Now 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.