Use this as the sortCompareFunction on your column:
public function compareValues(a:Object, b:Object):int
{
if(a == null && b == null)
return 0;
if(a == null)
return 1;
if(b == null)
return -1;
if(a < b)
return -1;
if(a == b)
return 0;
return 1;
}
--- In [email protected], "hugocorept" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> In my App I need a custom sortCompareFunction to resove my problem.
> My problem is, if I have a column with "1, 2, 1, 3, null, 2, null', by
> default flex sort like this "null, null, 1, 1, 2, 2, 3" or "3, 2, 2,
> 1, 1, null, null". It means, first cames the null then the values. I
> need "1, 1, 2, 2, 3, null, null"
>
> How can I have the reverse, first the values ASC, then the nulls.
>
> Thank you so much.
> Core Reagards
>