This example demonstrates how to select grid records and perform on them some action.
To select/unselect only one record, we use grid.toggleSelected method.
To select/unselect all records, we use grid.toggleSelectAll method.
To get all selected records, we use grid.getAllSelected method.
Let’s implement a simple grid which will consist of
‘name’, ‘surname’, ‘phone’, ‘age’, ‘gender’ fields
and first column ‘bulk’ containing checkboxes for toggling selection of records.
In our example
selecting of 1 record will be performed in columns.onClickRefs() at columns.js
by calling grid.toggleSelected(recordId).
Selecting of all records will be performed in method toggleSelectMode()
by calling this.grid.toggleSelectAll() at MainComponent.js