Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
limitedwave777 #1
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;
fxcPager.pageData.refresh();
}
What do I need to do to get this sort function to work on the {acSlides} array
collection instead of {fxcPager.pageData} ???
Thanks!
limitedwave777 Guest
-
Array Sorting
Hey everyone, I figured someone out there must have come across the need for this before, so rather than continue banging my head against the... -
Sorting an Array containing a structure...
I a loop nested in a loop that drives a query that kind of walks backwards out by a commodity classification then by region classification... so... -
Advance Sorting Array
Hello How would one go about sorting a (Jagged Array??). Here is my code of the array that is getting populated with all users in active... -
Array Sorting, 2 items...
Hi, Trying to accomplish: I want to sort my array by two columns. The array is setup: Array ( => Array ( -
[PHP] Array Sorting, 2 items...
> -----Original Message----- Well, erm, maybe I've got the wrong glasses on today, or maybe you've made a cut'n'paste boo-boo, but it sure looks...



Reply With Quote

