1 Reply Latest reply on Nov 8, 2010 3:41 PM by SashaKeith

    Filtering data

    GeorgeWS Level 1

      I have a datagrid filled from an ArrayCollection. I have a combo

      box I want to use to filter the data. like:


      public function processFilter(item:Object):Boolean



      var result:Boolean=false;


      if(item.YDSPNO == brandfilter2.selectedItem.data)




      return result;




      Filtering works great I pick something from the combobox and the data in the datagrid gets filtered:


      [Bindable] private var newSupplier:ArrayCollection=new ArrayCollection;


      public function doPrompt2( event:ResultEvent ):void {

      newSupplier = Suppliers2.Suppliers2.lastResult;


      var prompt:Object = new Object();

      prompt.data =


      prompt.label =

      "Select Supplier";

      newSupplier.addItemAt( prompt, 0 );

      brandfilter2.selectedIndex = 0;





      id="brandfilter2" dataProvider="{newSupplier}" labelField="label" width="200" change="myBrand.refresh()" height="35" fontSize="15" includeInLayout="false" visible="false" close="selectedItem=ComboBox(event.target).selectedItem"/>


      My issue is that when I put the combobox back to "select Supplier" it does not reset to the full data set. I have other senarios just like this and they work fine. STUMPED