Hi,
try
private function myFilterFunction(item:Object): Boolean
{
trace("item.pizza " + item.pizza);
return (item.pizza == pizzaSelected) ;
}
Look at the console, maybe you have all item.pizza == false.
Henrique F. Marino
blog.dclick.com.br
www.dclick.com.br
--- In [email protected], "Tracy Spratt" <tspr...@...> wrote:
>
> Debug it. Does pizza_ckb.data contain what you expect? Is you filter
> function working correctly?
>
>
>
> Tracy Spratt
> Lariat Services
>
> Flex development bandwidth available
>
> ________________________________
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of johndoematrix
> Sent: Monday, February 09, 2009 8:52 AM
> To: [email protected]
> Subject: [flexcoders] filter arraycollection with checkbox acting wired
>
>
>
> hi i am trying to filter an array collection using a checkbox, but
> when i select the check box all the data disappears. here is my filter
> function
>
> private var pizzaSelected:Boolean;
>
> private function pizzaFilter():void {
> if (pizza_ckb.selected == true)
> pizzaSelected = pizza_ckb.data;
> filterGrid();
> pizzaAr.refresh();
> }
>
> private function filterGrid() :void
> {
> pizzaAr.filterFunction=myFilterFunction;
> pizzaAr.refresh();
> }
>
> private function myFilterFunction(item:Object): Boolean
> {
> return
> (item.pizza == pizzaSelected) ;
> }
>
> then on my pizza_ckb checkbox on the click event i call
> pizzaFilter(); is there something am doing wrong. if there is pizza
> then the result is true and pizza records show if false nothing is
> supposed to show up.
>