There are a few different ways described to select the first row in a grid programmatically, but they all seem to rely on the markup of the grid, and not the data in the grid.
For instance, one way is this:
However, that only works if there is no filtering. If filtering is enabled (Mode = "Row"), than the code needs to be
Of course, we could check if filtering is enabled (this is dynamic in our case), and adjust the code accordingly. Still, it doesn't feel robust, instead it would be better to select referencing the data, something like:
The selectAt method doesn't exist, but are there other ways?