0 Replies Latest reply on Dec 7, 2009 9:45 AM by lerooooogk

    Filtering dataProvider Datagrid in its actual State


      Hi all,


      I'm filtering a datagrid and I have two ways to do that.


      I'd like to filter the datagrid by its actual state. I mean, first I filter for example by "Name = Adam " and I have all Adam's Name. Later I'd like to search for example "Surname = James" but I want to search only all Adams with surname James.


      My problem is I used multiple filterFunction (lot of possibilities to filter) but I dont find a way to filter by the last matches.


      A bit of my code:


      public function match(textFields:Object, dataFields:Object):void{
                  _data = _grid.dataProvider as ArrayCollection; (here its the problem)
                  _data.filterFunction = filterFunc;


      And for example, other filterFunction:


          public function matchOwner(textFields:Object, dataFields:Object, textOwners:Object, dataOwners:Object,
                                         textParams:Object, dataParams:Object, minDate:Date, maxDate:Date):void{
                 _data = _grid.dataProvider as ArrayCollection;       
                  _textParam = textParams as String;
                  _dataParam = dataParams as String;
                  minimunDate = minDate;
                  maximunDate = maxDate;
                  _data.filterFunction = filterFunctionAdvanced;



      Thanks in advanced,