# Row Selection in Pivot Layouts

Canonical page: https://www.adaptabletools.com/docs/handbook-layouts-pivot-selecting

- Full Row Selection capabilities are provided in Pivot Layouts

[Layouts](https://www.adaptabletools.com/docs/handbook-layouts/index.md) · [Pivot Layouts](https://www.adaptabletools.com/docs/handbook-layouts-pivot/index.md) · [All Pivot Layout Topics](https://www.adaptabletools.com/docs/handbook-layouts-pivot/index.md#pivot-layout-topics).

Row Selection in Pivot Layouts is configured using the `RowSelection` property.

This property - also used for Table Layouts - allows for very configurable control over how rows can be selected in the Layout.

It includes creating a dedicated Selection Column with checkboxes for easy row selection.

Per-row checkbox visibility (e.g. hiding checkboxes on total / empty rows) is configured via `layoutOptions.isRowSelectionCheckboxVisible` — see [Checkbox Visibility](https://www.adaptabletools.com/docs/handbook-layouts-table-row-selection/index.md#checkbox-visibility).

See [Row Selection in Table Layouts](https://www.adaptabletools.com/docs/handbook-layouts-table-row-selection/index.md) for full details, together with many demos, of the selection options

**Example: Pivot Layouts: Row Selection**

Row Selection in Pivot Layouts

- - This example contains 2 Layouts each of which has a different values for the `RowSelection` object:
  - `Pivot Cols Layout` - has "standard" row selection
  - `Pivot Sum Layout` - has no Header Checkbox and allows row selection by clicking anywhere in the Row

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Table Layouts Row Selection Pivoting',
  initialState: {
    Dashboard: {
      ModuleButtons: ['Layout'],
      Tabs: [
        {
          Name: 'Default',
          Toolbars: ['Layout'],
        },
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Layout'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Pivot Cols Layout',
      Layouts: [
        {
          Name: 'Pivot Cols Layout',
          PivotColumns: ['license'],
          PivotGroupedColumns: ['language'],
          PivotAggregationColumns: [
            {
              ColumnId: 'github_watchers',
              AggFunc: 'count',
            },
            {
              ColumnId: 'github_stars',
              AggFunc: 'sum',
            },
          ],
          ColumnSizing: {
            week_issue_change: {Width: 475},
          },
          RowSelection: {
            Mode: 'multiRow',
            Checkboxes: true,
            HeaderCheckbox: true,
          },
        },
        {
          Name: 'Pivot Sum Layout',
          PivotColumns: [],
          PivotGroupedColumns: ['license'],
          SuppressAggFuncInHeader: true,
          PivotAggregationColumns: [
            {
              ColumnId: 'github_watchers',
              AggFunc: 'sum',
            },
            {
              ColumnId: 'github_stars',
              AggFunc: 'sum',
            },
            {
              ColumnId: 'Total',
              AggFunc: 'sum',
            },
          ],
          RowSelection: {
            Mode: 'multiRow',
            Checkboxes: true,
            HeaderCheckbox: false,
            EnableClickSelection: 'enableSelection',
          },
        },
      ],
    },
  },
};
```
