I don't know any shortcut, and I looked before I implemented my own node
sort.  I'll find and post that function if you would like.  It is
specific to my use, and not a general sort and I don't remember how hard
I worked on efficiency since I only had 3-5 nodes to sort.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Ben Marchbanks
Sent: Tuesday, September 11, 2007 12:07 PM
To: [email protected]
Subject: Re: [flexcoders] Filtering XML best practices

 

Related to filtering - it would be nice if one could sort XML using
something like

var newXMLList = myXMLList.(myField.sort())

Otherwise is there any shortcut method for sorting XML on client-side ??

Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com <http://www.alQemy.com> 

::: magazooms ::: digital magazines
http://www.magazooms.com <http://www.magazooms.com> 

Greenville, SC
864.284.9918

Tracy Spratt wrote:
> 
> 
> I would create a [Bindable] instance variable typed as
XMLListCollection 
> and bind the dg.dataProvider to that.
> 
> 
> 
> Then, in the button handlers, set the bound variable:
> 
> var xlFilteredData:XMLList = userXML.(category=='guest');
> 
> _xlcData = new XMLListCollection(xlFilteredData);
> 
> 
> 
> Tracy
> 
> 
> 
> ----------------------------------------------------------
> 
> *From:* [email protected]
<mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] 
> *On Behalf Of *donvoltz
> *Sent:* Tuesday, September 11, 2007 10:21 AM
> *To:* [email protected] <mailto:flexcoders%40yahoogroups.com>

> *Subject:* [flexcoders] Filtering XML best practices
> 
> 
> 
> Hi Everyone,
> 
> I have been using a master XML file containing about 120 usernames
> and additional information. Currently using custom renderers and a
> datagrid, I am displaying all of the users. What I would like to do
> is add buttons along the top of the datgrid to filter this XML into
> 4 - 5 different groups based on a category designation in the XML. My
> question about this is what is the best practice way to do this?
> 
> Should I create a new XMLListCollection that filters the master list
> for each of the categories or can I add e4x filtering directly into
> the databinding property of the datagrid using actionscript and a
> custom event when one of the "filter" buttons is pressed. I have not
> been able to get this second method to work so I am unsure if this is
> possible.
> (this is what I have tried to do in the datagrid tag dataProvider
> = "{userXML.(category=='guest')}")
> 
> Thanks for any help and guidance
> 
> Sincerely,
> 
> Don
> 
> 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com <http://www.alQemy.com> 

::: magazooms ::: digital magazines
http://www.magazooms.com <http://www.magazooms.com> 

Greenville, SC
864.284.9918

 

Reply via email to