I have a spark DataGrid component with several columns and I want to have my application default to descending order on the first column in the DataGrid. I would like to use the built-in default sort that occurs when clicking the top header once. I have no need to sort the ArrayCollection I’m working with or change what the comparators are.
I also want any user-generated sorting such as clicking on a different column’s header to override the default sorting.
Does anyone have any ideas on how to go about this? Thanks.
Just use
sortByColumnmethod:Here is a full example:
DataGridSort.mxml
Product.as