Expand my Community achievements bar.

search/sort buttons only works ones

Avatar

Level 1
Hi,



I'm using an HorizontalList in my application to show some
pictures.

This list is using 'gallery.photos' as a dataprovider.

'gallery' is an object, which contains the arraycollection
'photos', and that arraycollection contains several 'photo'
objects.

Now, I made some search(/filter) and sort buttons/functions.
At the end of these functions I use the 'gallery.photos.refresh();'
command to update the dataprovider of the HorizontalList.

No problem with that, but after I use a search/sort button I
can't use any other search/sort buttons anymore (I can't click on
the buttons), but I have no idea why.



Here's an example of the functions I'm using:



private function sortNaam():void

{

var sort:Sort = new Sort();

sort.fields = [new SortField("naam",true,false)];

gallery.photos.sort = sort;

gallery.photos.refresh();



}





<mx:Button id="sorteerNaam" click="sortNaam();"
label="Sorteer Naam"/>
0 Replies