We have many scenarios where it will be useful to select which row of a gallery is active and ensure it is visible. For example, if a screen allows “in-gallery” editing, and the user clicks on the “Add” button, we add a blank row in the gallery, but the user must scroll/sort/search the new records if the gallery as many. In another scenario, the user scrolls in the gallery and the clicks on “view detail” button that opens a screen with the selected record information. When the user returns to the gallery screen, it is repositioned at the beginning of the list.
In both scenarios, it will be helpful to
be able to indicate programmatically which row is the “selected” one in the gallery : SelectRow(<Logical expression>) //Select the first row matching the expression
issue a command to ensure the selected row is currently visible: EnsureSelectedVisible(MyGallery) //Ensure the selected record of MyGallery is visible in the gallery control (even if the screen is not visible)