DataGrid programmatically scrollToRow


#1

I haven’t been able to find an example – how best to programmatically scroll to a row given a specified index?


#2

Using HandlingRowSelection as a reference – clicking on the Previous or Next button in the detailed view navigates the selected item in the ShinobiDataGrid in the MasterViewController. When the user navigates to an item outside of the viewed items in the MasterViewController view, the viewed items don’t cycle so that the selected item is at least in view on the screen of the device. How best to move the viewed elements on the screen in the event the selected item falls outside the range of viewed elements?

Then clicking next…


#3

Hi SolomonV,

Thanks for getting in touch!

We currently don’t have a method like “scrollToRow:” implemented on our Grids component.

To achieve this you can use the “setContentOffset:” method and calculate the offset of the row you want to scroll yourself by totaling up the previous row heights.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn.