0 Replies Latest reply on May 14, 2008 6:58 AM by limitedwave777

    Sorting array vs sorting paginated array

      ...pulling in a long list of photos in a gallery, and I have a sort function working within the pages of data fine. I need to bring it back out of the paging stuff so that it sorts the data, THEN passes to the paging function.

      My data comes from mysql > php > xml > Flex into an ArrayCollection, referred to in MXML as {acSlides}.
      Pass the array collection to the paging system like:
      <utils:FXCPager id="fxcPager" pageIndex="{currentPage}" pageSize="{pageSize}" dataProvider="{acSlides}" />
      then assign in repeater:
      <mx:Repeater id="slideRepeater" dataProvider="{fxcPager.pageData}">...</>
      There is a button for sorting that calls a function a la:
      private function sortByRating():void {
      var sort:Sort = new Sort();
      sort.fields = [new SortField("rating",false,true)];
      fxcPager.pageData.sort = sort;
      toggleRating = false;
      What do I need to do to get this sort function to work on the {acSlides} array collection instead of {fxcPager.pageData} ???