How to use grid selection to capture identifying information about the selected row(s)
Test it out
Select a checkbox and observe the values of the text fields
The Selected Employee IDs show the selected row's ID
Select the top checkbox in the column header row
The Selected Employee IDs show 10 selected values
Notable implementation details
GridSelection must be used when a grid is configured for selection. The value of the grid is gridSelection rather than pagingInfo, and the value that the grid returns when the user interacts with it is also a gridSelection. PagingInfo information is embedded in gridSelection.
The values stored in the selected parameter of gridSelection are the identifiers of the datasubset. In this case, it's the primary key value.