thanks for your time Tracy, yes absolutely the whole shooting match is sent to 
the _one_ call to the function i.e. lstRepRankDrill, which is actually more 
than the dataprovider which is {lstRepRankDrill[0].record}. I know that the 
fact there is only one call to the filter is significant, but do not know why, 
unless it is because I have to put the filter on lstRepRankDrill.filterFunction 
= filterRepRankDtlChnl; and it is hierarchical. Obviously I cannot put the 
filter on lstRepRankDrill[0].record as it is XML and not an XMLListCollection. 
Am using DG not ADG if that makes any difference.  Eventually found 2 other 
Google questions out there with the same scenario - one call to the filter with 
the whole XMLListCollection being passed. No answers to them :-(

--- In [email protected], "Tracy Spratt" <tr...@...> wrote:
>
> I don't use ADG all that much, but the filter functions should get a
> "record" node for each call of the filter function.  Have you used
> toXMLString() to trace out the item?  Inside the filter function you can use
> any e4x expressions to traverse the xml, down into the child nodes or even
> up to parent nodes.
> 
>  
> 
> I am pretty sure you are not getting the entire dataProvider in the
> function.  Do the trace.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _____  
> 
> From: [email protected] [mailto:[email protected]] On
> Behalf Of chigwell23
> Sent: Thursday, August 27, 2009 4:25 AM
> To: [email protected]
> Subject: [flexcoders] Re: Apply filterFunction to datagrid XMLListCollection
> dataprovider question
> 
>  
> 
>   
> 
> 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 flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> "Tracy Spratt" <tracy@> wrote:
> >
> > Break the code into smaller pieces and debug to see what is wrong.
> > 
> > 
> > 
> > Tracy Spratt,
> > 
> > Lariat Services, development services available
> > 
> > _____ 
> > 
> > From: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com
> [mailto:flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com]
> On
> > Behalf Of chigwell23
> > Sent: Thursday, August 27, 2009 2:40 AM
> > To: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com
> > 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.
> >
>


Reply via email to