Grid.scrollToIndex but how to find index?

I have a grid with items and programmatically I select an item.
i.e. Query<>()).filter(v-> v.getMyID() == myID).findFirst().orElse(null));

How can I scroll to the selected item based on index?
What I’m asking is that although I can use the grid.scrollToIndex but how can I find index of the item?
(Consider that the grid is sortable from the headers etc, so finding the index from the ArrayList of the dataprovider won’t do any good)