Re: [flexcoders] DataGridColumn sortDescending property doesn't change after first two clicks on header

2007-04-26 Thread Sergey Kovalyov

Thanks! Though everything works even when I postpone calculation to
commitProperties(). :)

On 4/26/07, Manish Jethani [EMAIL PROTECTED] wrote:


  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]skovalyov.flexcoders%40gmail.com
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.





[flexcoders] DataGridColumn sortDescending property doesn't change after first two clicks on header

2007-04-25 Thread Sergey Kovalyov

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.


Re: [flexcoders] DataGridColumn sortDescending property doesn't change after first two clicks on header

2007-04-25 Thread Manish Jethani
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.