At the moment, you can "select" several lines in grids via checkboxes, as well as "select" a single line by mouse clicks. Some commands act on selected rows, some on the selected row. The difference between "mark" and "select" should be transparent for users.
The selection of single as well as multiple lines shall be possible (like in Excel) (via Ctrl/Shift).
All commands shall refer to the selected row(s) in sequence, and may be disabled if they do not support multiple selection. Edit mode of the grid allows only single selection.
Most important is the extension of the selection by "Shift", the selection of single non-contiguous rows by Ctrl is less important.
Desired date: 20.08.2019
Implementation
The selections have been unified so that there is no longer a difference between a row or checkbox selection. As a result, a row can be selected via a checkbox or by clicking on the row. All actions for selected rows now behave the same, regardless of how the rows were selected. // Multiselection using CTRL/SHIFT has been implemented. Since the previously used selection model from the TableViewModel is not suitable for implementing multi-selection, the selection model has been replaced by the model from TableModel. Whether a multi-selection is allowed can be configured within the selectionModelFactory with multiple.
Code Migration
GridComponent.getSelectionModel() no longer uses the FormGroups for trees, but the GridTreeTableNodes. Code that uses this must be modified accordingly. For switching between these object types, new methods have been added under #24566. See the "Details" section of that ticket.
The following API changes have taken place:
GridComponent.initViewModel(FormContext, TableViewModel) -> GridComponent.initViewModel(TableViewModel)
Test
Since selected rows are now stored in the TableModel instead of the TableViewModel, errors or merge conflicts may occur in #23466 in onReturn(), where the current row is determined by the TableViewModel. Therefore it must be tested whether the change of the row with Return still works correctly.