I understood the problem like this:
He has a part of the total data in the flex client. Because the client does not know all of the data, sorting can't be done client side.
He already has the serverside sorting working.
What he needs to do now is: When the user clicks on the header of the datagrid he wants to make a server call and get the sorted data back.
The default behaviour when the header of a grid is clicked is that the data is sorted client side.
So thats why he needs to to something client side.
The only thing I found was this:
<mx:DataGrid xmlns:mx="http://www.adobe.com/2006/mxml"
headerRelease="onHeaderRelease(event)">
The specified function onHeaderRelease is called as soon as the mousebutton on a header was clicked (the mousebutton was released again).
Example function. Maybe you can pick up from here
public function onHeaderRelease(evt:DataGridEvent):void
{
var grd:DataGrid = DataGrid(evt.currentTarget);
Alert.show(evt.columnIndex + " : " + (DataGridColumn)(grd.columns[evt.columnIndex]).sortDescending, "ColumnIndex : Sorted Descending?");
// do the server called and get the sorted array back
}
I hope this will help you!