On 29/04/2013 10:56, Adnan Doric wrote:
Hello all,

I would like to be able to click on Datagrid headers and trigger backend call in order to paginate/sort/filter and send back an updated collection. Datagrid should just display it as is.

How can this be done with data grid sort indicators correctly reflecting the state "ASC" or "DESC"?
It's easier than you think.
If you are already backing this with a server result, drop in James Ward's awesome PagedList connector to an AsyncListView as the dataprovider : http://www.jamesward.com/2010/10/11/data-paging-in-flex-4/

Now just send the sort direction along with the call to the backend. You can get this by listening for gridClick events with (event.rowIndex == -1)&&(event.columnIndex!=-1) and saving off the column name.

Applying a matching Sort to the local dataProvider and it'll show the right indicators.

Tom

Reply via email to