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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to