1 Reply Latest reply on Jan 16, 2008 8:44 AM by Newsgroup_User

    double filter

    Level 7
      Hi All,
      I have a combo box filterin an array and also a set of letter doing filter
      also base on the first letter of a client and prospect.
      How can I combine both?
      Means if I select Client in the comboBox and click the letter M, I want to
      filter only client and letter M.
      Please help.
      thanks

      JFB

      private function filterDatagrid():void

      {

      acCustomers.filterFunction = customerStatusFilter;

      acCustomers.refresh();

      }


      public function customerStatusFilter(item:Object):Boolean

      {

      if (type_cb.selectedLabel != "ALL")

      {


      return item.typeDesc == type_cb.selectedLabel;

      } else {

      return true;

      }

      }


      private function LetterFilterDatagrid(letter:String):void

      {

      tempLetter = letter;

      acCustomers.filterFunction = customerLetterFilter;

      acCustomers.refresh();

      }


      public function customerLetterFilter(item:Object):Boolean

      {

      if (item.customer.toString().substr(0,1) == tempLetter)

      {

      return true;

      } else {

      return false;

      }

      }


        • 1. Re: double filter
          Level 7
          Never mine... I got it.
          Adobe has to put more people here to help.
          Rgds

          Johnny


          "JFB" <jfb@help.com> wrote in message
          news:fml6sk$kbr$1@forums.macromedia.com...
          > Hi All,
          > I have a combo box filterin an array and also a set of letter doing
          > filter also base on the first letter of a client and prospect.
          > How can I combine both?
          > Means if I select Client in the comboBox and click the letter M, I want to
          > filter only client and letter M.
          > Please help.
          > thanks
          >
          > JFB
          >
          > private function filterDatagrid():void
          >
          > {
          >
          > acCustomers.filterFunction = customerStatusFilter;
          >
          > acCustomers.refresh();
          >
          > }
          >
          >
          > public function customerStatusFilter(item:Object):Boolean
          >
          > {
          >
          > if (type_cb.selectedLabel != "ALL")
          >
          > {
          >
          >
          > return item.typeDesc == type_cb.selectedLabel;
          >
          > } else {
          >
          > return true;
          >
          > }
          >
          > }
          >
          >
          > private function LetterFilterDatagrid(letter:String):void
          >
          > {
          >
          > tempLetter = letter;
          >
          > acCustomers.filterFunction = customerLetterFilter;
          >
          > acCustomers.refresh();
          >
          > }
          >
          >
          > public function customerLetterFilter(item:Object):Boolean
          >
          > {
          >
          > if (item.customer.toString().substr(0,1) == tempLetter)
          >
          > {
          >
          > return true;
          >
          > } else {
          >
          > return false;
          >
          > }
          >
          > }
          >
          >