I wonder if is even possible to use the filter function with hierarchical XML,
as all of the examples I have seen are of array collections or flat XML?
This I think is the problem - the complete data provider is being passed into
the item parameter of the filter i.e. the xml hierarchy in its entirety. I am
presuming that the filter wants one "row" at a time so it can do its compare.
Where do I have control of this? I am not sure I do since the only code is
lstRepRankDrill.filterFunction = filterRepRankDtlChnl;
The data provider is
dataProvider="{lstRepRankDrill[0].record}" in order to dig into the XML
hierarchy to get to the data. (Wrapper nodes are returned by SQL back end.
--- In [email protected], "Tracy Spratt" <tr...@...> wrote:
>
> Break the code into smaller pieces and debug to see what is wrong.
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _____
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of chigwell23
> Sent: Thursday, August 27, 2009 2:40 AM
> To: [email protected]
> Subject: [flexcoders] Apply filterFunction to datagrid XMLListCollection
> dataprovider question
>
>
>
>
>
> private function filterRepRankDtlChnl(item:Object):Boolean{
> if(item.results.record.chnl_cd == "PREM") return true;
> else return false;
> }
>
> Filter is not filtering and I think it maybe item.results.record.chnl_cd -
> the item:Object is in this format:
>
> item
> ...<results>
> ......<record>
> .........<chnl_cd>
> .........<rep_nm> etc
>
> What is the correct "path" for chnl_cd and might this be the problem? TIA,
>
> Mic.
>