Flex 4.5 Spark Datagrid multi-column sort

By : Mark
Source: Stackoverflow.com

does anyboy know if Flex 4.5 Spark Datagrid suppoprts multi-column sort natively - just like the ADG does?

I'm looking at the api documentation and cannot see anything on this...


By : Mark


Not natively no. There's constant improvements being done on the charting for Flex, but this hasn't been added in just yet.

Your best solution would be to have a listener on the column headers and then sort the data yourself. It isn't that hard, but it's important to be able to keep 'state' on the sort. Plus, it'll give you better malleability to change the sorting options.

By : J_A_X

I use the sortCompareFunction property of the spark DataGrid to define a function with the multi-column sorting logic in it. It works well enough, for the moment.

By : Anjan

The 4.10/4.11 release from Apache has the methods needed. We've blogged about this here: http://blog.flexicious.com/post/Spark-DataGrid-Multi-Column-Sort.aspx

This video can help you solving your question :)
By: admin