So given that xml, what do you want your tree to look like? Tracy
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alain Thibodeau Sent: Wednesday, March 28, 2007 8:12 AM To: [email protected] Subject: [flexcoders] HTTPService/ArrayCollection/DataGrid/Tree/ Hi all, I was wondering if someone could please point me in the correct direction. I have an HTTPService that I am using with a datagrid, the Service's data is loaded into an ArrayCollection and I filter the ArrayCollection with a filterFunction. All works great. I now want to take the same ArrayCollection and load certain elements of the data into a tree. This is where I am getting errors. The xml: <?xml version="1.0" encoding="utf-8"?> <build> <item id="1"> <name>Name</name> <area>Chicago</area> <status>Avail.</status> <spec>1264</spec> <size>40</size> </item> <item id="2"> <name>Name</name> <area>New York</area> <status>Avail.</status> <spec>1264</spec> <size>49</size> </item> </build> I want to display in the tree the area(s) as the folder and the name under it as a leaf(s). All I managed to do is a labelFunction that returns the area, and populates the tree as leafs. I am assuming, I will have to create a custom function? private function trModels(item:Object):String{ return item.community; } Now all the docs I could find tell me to use the result on the httpservice as e4x and filter the data that way for the tree, but when I specify e4x as resultFormat I get an error and it breaks my filtering on the datagrid...: Error #1034: Type Coercion failed: cannot convert [EMAIL PROTECTED] to mx.collections.ArrayCollection. Can anyone point me in the correct direction please? There must be a way to filter data that is not "tree" friendly.. thank-you ________________________________ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers. <http://ca.answers.yahoo.com>

