10

I'm using the new Spark Datagrid for a project, but I must confess the scroller is annoying me a little bit, so I would like to have some control over it.

In other words, I would like to programatically set the Datagrid scroller position to the position I want.

Thank you in advance.

Felipe
  • 11,557
  • 7
  • 56
  • 103

3 Answers3

5

While the links above are useful to get to the answer, here is the direct answer:

someDataGrid.grid.layout.verticalScrollPosition
Jason Sturges
  • 15,855
  • 14
  • 59
  • 80
Clayton
  • 74
  • 1
  • 1
1

Simply use ensureCellIsVisible

datagrid.ensureCellIsVisible(dgArrayCollection.length - 1,-1);

where dgArrayCollection is the dataprovider of the datagrid

Anil Chahal
  • 2,544
  • 2
  • 22
  • 19