Felipe
Felipe

Reputation: 11887

How to control a spark Datagrid's scroller position in Flex?

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.

Upvotes: 10

Views: 5355

Answers (3)

Anil Chahal
Anil Chahal

Reputation: 2593

Simply use ensureCellIsVisible

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

where dgArrayCollection is the dataprovider of the datagrid

Upvotes: 1

Clayton
Clayton

Reputation: 74

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

someDataGrid.grid.layout.verticalScrollPosition

Upvotes: 5

Related Questions