Write a filter function..something like this..setFilter in the code below is a 
placeholder for whatever you want to match..presumably from a combo box drop 
down that implements the filter.

private function filterAc(item:Object):Boolean {
   if(setFilter=='All') return true;
   if(item.productType!=setFilter) return false
   else return true;                    
}       

now set the filterfunction for you array collection ac on createComplete of the 
tilelist

ac.filterFunction=filterAc

Whenever the filter changes you have to call ac.refresh(); this will 
automatically call the filter fucntion and check against the setFilter. We do 
this for the pagination on our website.

FlexDownloads.com Web Admin

--- In flexcoders@yahoogroups.com, Alex Harui <aha...@...> wrote:
>
> If you download the source for any version of the SDK, there is a folder in 
> frameworks/tests called checkinapp.  It has a filtered tilelist in it.
> 
> 
> On 1/27/10 8:42 AM, "Wally Kolcz" <wko...@...> wrote:
> 
> 
> 
> 
> 
> 
> Can someone point me in the right direction and tell me what to
> research? I have a TileList binded to an ArrayCollection. One attribute
> of the AC is 'productType' which is a String. I want to have buttons
> that, when clicked, make all items not of that value disappear. Its a
> filtering function for a product list.
> 
> If the user clicks the 'Soap' button, I would like all items in the
> TileList that are not Soap to disappear. I also would need to know how
> to have an 'All' button restore the original TileList.
> 
> Thanks for any info you all can provide!
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>


Reply via email to