开发者

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

开发者 https://www.devze.com 2023-03-29 13:17 出处:网络
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.

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 p开发者_如何学Crogramatically set the Datagrid scroller position to the position I want.

Thank you in advance.


  1. Setting the horizontal scroll position in the HorizontalList control in Flex
  2. Setting the vertical scroll position on a Spark List control in Flex 4
  3. Programmatically scrolling the Spark TextArea control in Flex 4
  4. Flex 4 List remembering verticalScrollPosition
  5. Scroll automatically to the bottom of a Container or TextArea

hope these links will work for you.


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

someDataGrid.grid.layout.verticalScrollPosition


Simply use ensureCellIsVisible

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

where dgArrayCollection is the dataprovider of the datagrid

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号