Configure the grid to allow users to select rows by clicking them, focusing a row and pressing ␣ Space or via API.
Enabling Row Selection
Row selection is configured with the rowSelection
grid property. Setting rowSelection.mode
to either 'multiRow'
or 'singleRow'
will allow you to select rows by clicking, focusing a row and pressing ␣ Space, or via the selection API.
<ag-grid-angular
[rowSelection]="rowSelection"
/* other grid options ... */ />
this.rowSelection = {
mode: 'singleRow',
};
The following example illustrates a basic row selection configuration. Use the select control to choose the default single row or multi-row configuration.
See detailed documentation on the two row selection modes:
Enterprise Features
Row selection can be used when using row grouping, tree data and the server-side row model. See the respective sections of the documentation:
Next up
Continue to the next section to learn about Single Row Selection.