Hi Malik,

I have never exactly populated a tree with straight query data, i
usually convert it to xml first within the cfc that i'm calling, and i
return a string from that cfc... it took some playing with but i
eventually got it... 

google the following: 

"using cfxml returning it to flex?"  or something along those lines...
that will teach you how to convert your query to xml... but the thing
is, flex doesn't want the actual xml doc from coldfusion, it wants the
valid string format...  

here is my example

http://axel.cfwebtools.com/index.cfm/2007/2/6/Returning-a-query-to-flex-as-xml#more

once you get it into flex, it will be declared as xml, and then in
your mx:Tree your going to declare a showRoot="false" 

the blog might be a little hard to follow, but I hope it helps.

--- In flexcoders@yahoogroups.com, "malik_robinson"
<[EMAIL PROTECTED]> wrote:
>
> 
> Hi,
> 
> I want to display a list of companies and contacts associated with each
> company in my app.  I  think a tree can do this, but I wanted to ask how
> can I populate a tree from a query?  I would like the folders to be the
> companies and when you expand the folder you see a list of contacts
> associated.
> 
> I am using CF so in CF I have a query that does a group by so I'd like
> to use that and populate the tree but I am unsure on how to do this.   I
> understand the tree needs a data provider, but how do I handle the
> grouping?
> 
> Thanks
> 
> -M
>


Reply via email to