The described issue is caused by the fact that the current Grid selection functionality exposes the absolute row index of the selected row only, and it is not directly correlated to the actual data item.
We recently released a serious reimplementation of the selection functionality, and many new features like multiple row selection, programmatic selection, selection via checkbox column, as well as an API for obtaining the currently selected data items, is now available out-of-the-box.
The development build should is now available, and you can get more details about the enhancements, and how to install and use this release in the following GitHub issue:
Meanwhile, you can obtain the correct item by processing the data in accordance with the current Grid State (sorting, paging etc. config), for example:
In scenarios, involving grouped data, the data should be flattened first, as it has different structure, and then the item should be obtained by the respective index, e.g.:
I hope this helps.