I assume you're cancelling the default sort, which is why the column's
sortDescending is never updated.
You'll have to get the actual sort order from the collection itself.
var descending:Boolean = false;
var s:Sort = collection.sort;
var fields:Array = s.fields;
for (var i = 0; i < fields.length; i++)
if (fields[i].name == dataField)
descending = fields[i].descending
// now you have the value
On 4/25/07, Sergey Kovalyov <[EMAIL PROTECTED]> wrote:
>
> Hi All!
>
> I have defined my own handler for the headerRelease event in order to
> perform custom server-side sorting, since my DataGrid is pagable. In order
> to do that I get the field from event.dataField and and order from
> DataGridColumn(DataGrid(event.target).columns[event.columnIndex]).sortDescending,
> though sortDescending is false after first and second clicks. Why?
>
> Sergey.