does anyone have any examples of how i can create multiple filters for use in 
two comboboxes for one datagrid? seems my implementation only filters on one 
but not both e.g if i select items that are size 12 i cant further select size 
12 items that are black... AS3 code below

private function filterColourData():void
            {
                
                xmlData2.filterFunction = applyColourFilter;
                xmlData2.refresh()
                Alert.show(xmlData2.length.toString());
                
            }
                public function applyColourFilter(item:Object):Boolean
                {
                                        
                        if(colourFilter.selectedItem == "All colours")
                        {
                                return true
                                
                        }
                        
                        else
                        {
                        return item.colour == colourFilter.selectedItem;
                        
                        }
                        
                        
                        
                
                        
                        
                }
                
                
                 private function filterSizeData():void
            {
                
                xmlData2.filterFunction = applySizeFilter;
                xmlData2.refresh()
                Alert.show(xmlData2.length.toString());
                
            }
                public function applySizeFilter(item:Object):Boolean
                {
                                        
                                        
                        if(sizeFilter.selectedItem == "All sizes")
                        {
                                return true
                        }
                        else
                        {
                        return item.sizes == sizeFilter.selectedItem;
                        
                        }
                        
                
                        
                        
                }

Reply via email to