开发者

How to determine currently sorted header column in data grid?

开发者 https://www.devze.com 2023-01-06 11:53 出处:网络
I want to know which header the user clicked on to give the currently sorted view. Is there an API in flex framework that I开发者_StackOverflow中文版 can use to achieve this? Hopefully I can get back

I want to know which header the user clicked on to give the currently sorted view. Is there an API in flex framework that I开发者_StackOverflow中文版 can use to achieve this? Hopefully I can get back a column index so I know how it is currently sorted.

Thanks, Mike


The mx.controls.DataGrid has a property named columns. Each column in this collection is an object of type mx.controls.dataGridClasses.DataGridColumn with a boolean property named sortDescending.

Otherwise, you can receive and handle the DataGrid event headerRelease. This event is transmitted when the user releases the mouse button on a column header, causing the column to become sorted.

0

精彩评论

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

关注公众号