views:

13

answers:

1

Hi I have a datagrid. 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 can use to achieve this? Hopefully I can get back a column index so I know how it is currently sorted.

Thanks, Mike

A: 

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.

Heath Hunnicutt