[英]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. 我正在为一个项目使用新的Spark Datagrid,但我必须承认滚动条让我烦恼一点,所以我想对它有一些控制权。
In other words, I would like to programatically set the Datagrid scroller position to the position I want. 换句话说,我想以编程方式将Datagrid滚动条位置设置为我想要的位置。
Thank you in advance. 先感谢您。
hope these links will work for you. 希望这些链接对您有用。
虽然上面的链接对于得到答案很有用,但这是直接答案:
someDataGrid.grid.layout.verticalScrollPosition
Simply use ensureCellIsVisible 只需使用ensureCellIsVisible即可
datagrid.ensureCellIsVisible(dgArrayCollection.length - 1,-1);
where dgArrayCollection is the dataprovider of the datagrid 其中dgArrayCollection是数据网格的数据提供者
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.