In theory, the sortArrow will show if the dataProvider has a valid sort
property with a single sortField that describes the sorted column.  If
you did a more complex sort, you might be better off drawing custom
header renderers that better depicts the complex sort.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of polestar11
Sent: Tuesday, May 22, 2007 6:06 AM
To: [email protected]
Subject: [flexcoders] Re: Datagrid auto sorting. Has anyone done this?

 

Hi there

I tried exactly that in various different ways, but wasnt able to get
it to work. 

I have an array, which I convert to an array collection, on which I
sort and refresh, after which I set as a dataProvider for my DataGrid.

Still no sort arrow is shown.

I then tried extending the DataGrid class, but that opened up another
can of worms

Help, anyone??
Tracy

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Manish Jethani"
<[EMAIL PROTECTED]> wrote:
>
> On 4/28/07, Mark Piller <[EMAIL PROTECTED]> wrote:
> > Do you know how to configure a datagrid to automatically sort in a
> > particular column before the data is rendered?
> 
> Basically you just set the sort on the collection, and the DataGrid
> will appropriately display a sort arrow on the header. So it's the
> collection you need to sort.
> 
> You can see an example of how to sort a collection here:
> 
> http://www.adobe.com/livedocs/flex/2/langref/mx/collections/Sort.html
<http://www.adobe.com/livedocs/flex/2/langref/mx/collections/Sort.html> 
>

 

Reply via email to