April 07, 2011

No sorting for Spark DataGrid? What the hell?

Simple test:
There are numerous examples of the new Spark DataGrid on the web, Just take one of them and put "sortable" on one of it's columns… nothing.
Looking at the SDK I see this nice comment over the "sortable" getter:

* @default true

TBD as in To Be Decided?
Are you serious, Adobe?
Did you really take away the most important feature of the data grid?

I might be wrong here, but information on the blogs and documentation clearly suggests that Adobe chose not to implement this feature at the moment.

Disappointing to say the least.


Jeff said...

try DataGrid.sortByColumns()

Flashmattic said...

Will do :)
Where is that documented?
Cheers Jeff

Flashmattic said...

It doesn't work. the Spark DataGrid does not have this API.

ChristopherCantrell said...

It is working now. If you don't provide your own sorting function then make sure the container sorts. I used ArrayList, which doesn't sort. Then I switched to ArrayCollection and the sort arrows appeared.


Flashmattic said...

Cool mate! I appriciate that :)