You need to set the ArrayCollection.sort property... have a look at mx.collections.Sort and mx.collections.SortField. There are examples on this page <http://livedocs.adobe.com/flex/2/langref/mx/collections/Sort.html> that show how you can create a Sort with multiple SortFields.

hth
Scott

Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com



monkeeeh wrote:

Thanks!
getItemIndex works not indexOf.
But still I have one problem.
i have ADG and arraycollection where all data is.
Arraycollection have ordernumber, orderline, product etc. data.
And i have grouped lines by ordernumber.

If i edit line it moves to last. Is there possible to sort data by
ordernumber and after that by orderline -number? of course if user
click header sorting change, but at default it sort by ordernumber,
orderline.

Thanks for helping!

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>, "Paul Dale" <[EMAIL PROTECTED]> wrote:
>
> The selectedIndex is the index of the row in the visual object,
which might
> not be the same as the index of the item in the data provider. You
can use
> data.setItemAt(adg.selectedItem,data.indexOf(adg.selectedItem)).
>
>

Reply via email to