Avatar

Level 2

Thank you for the tips,

i removed the dataField and wrote a sortCompareFunction.
The DataGrid is sortable now :slightly_smiling_face:

<mx:DataGridColumn id="c2" headerText="Score" sortCompareFunction="sortMe" labelFunction="scoreLabelFunction" />

import mx.utils.ObjectUtil;

private function sortMe(obj1:Object, obj2:Object):int{
return ObjectUtil.compare(obj1,obj2)
}

But this works only when the dataFileds are not changing.
When the dataFileds are changing the DataGrid overwrite the rows.
It seems that the DataGrid don't know where the new rows position after the sort.
It puts the rows on the same old position?