2 Replies Latest reply on Mar 15, 2010 2:39 AM by nikos101

    filterFunction problem in flex 4

    nikos101 Level 2

      When I refresh itemsD the filterFunction doesn't get called. Any ideas friends

       

       

      <s:creationComplete>
               <![CDATA[
               addListeners();
         
          itemsD.filterFunction = itemFilterFunction;
               ]]>
           </s:creationComplete>


       

      protected function button1_clickHandler(event:MouseEvent):void
                  {
                      itemsD.refresh();
                      getItemsCollection.refresh();
                  }

       


      private function itemFilterFunction(item:Object):Boolean
                  {
                      trace(item.SupplierName);
                      trace(item.ItemDesc);
                      trace(item.IsOnOrder);
                      trace(item.SupplierName.indexOf(supplierSearch.text));
                      item.SupplierName.indexOf(supplierSearch.text);

                     
                      return false;
                  }