1

How can I programmatically get and set column sorting parameters in AdvancedDataGrid?

I'm especially interested in value that indicates that user have sorted data in AdvancedDataGridColumn by clicking on its header and value that indicates sorting order. I haven't found appropriate properties in AdvancedDataGridColumn documentation. There is only sortDescending property, but that's not enough.

mr goose
  • 58
  • 4
  • 16

1 Answers1

2

Pass the column object to the getFieldSortInfo(column) method; it will give you a SortInfo object that has status (actual or proposed) and descending (boolean) variables that contain the information you need.

Amarghosh
  • 58,710
  • 11
  • 92
  • 121
  • Thank you! But, how can I programmatically apply this sorting parameters to the AdvancedDataGridColumn? – mr goose Jun 28 '10 at 12:30
  • @Sergey Use the [sortCompareFunction](http://livedocs.adobe.com/flex/3/langref/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.html#sortCompareFunction) – Amarghosh Jun 28 '10 at 12:39