Tutorial: Viewing a ColdFusion Query in a Flex DataGrid
I have long awaited for this day to post my first Captivate tutorial. The first topic that I am presenting on is one that I struggled with when I was first learning Flex 2 and also one that I know many other developers have an issue grasping. It is the subject of bringing in a basic ColdFusion query to a Flex application and showing it in a DataGrid. It is really not all that hard, but unless you know how to do it, there is really no way in “figuring it out”.
I decided a Captivate tutorial would demonstrate this best, so without further delay, here is the tutorial URL:
http://www.kylehayes.info/captivate/QueryToDatagrid/QueryToDataGrid.htm







What a great tutorial video for beginers like me. I would love to see more tutorial like this on how to do some basic records maintenance like being able to add, delete and edit records and pass it it back to the grid.
Yes, my time after work is starting to open up again so I am really hoping to be able to some more very soon.
I can’t get the tutorial to work. I get ‘acArtists is undefined’. It’s like it can’t ’see’ the array.
I have the latest version of ColdFusion 7 and Flex 2.0. Any ideas what I am doing wrong? HELP?
@Lara: Did you try to do some line by line debugging?
Great tutorial/demo.
Thanks
When I try to create the project it is telling me Invalid root. A config file must exist in WEB-INF/flex. I have the standalone coldfusion mx7 server installed. Do I have to install something for flex?
Are you running CFMX 7.02 (emphasis on the ‘02′)?
Turns out I am running 7,0,0,91690. I’ll update to 7.02 and try again. Thanks.
Thank you so much for the captivate tutorial. We are trying to pick up flex here at work, but without paying for classes. Books and their info are so limited out there, and specific questions usually go unanswered in forums. This issue in your tutorial was one we had questions about, so thank you for creating it. I wish you had more that answered some basic flex questions! Please consider making more. Thank you!
I currently use webservice calls to accomplish these kind of tasks, but I have been told remoteobject offers better performance. I don’t understand how a flex app like this would be portable though. What would we have to tweak in this example if it were moved off localhost.
You don’t as long as the CFC dot path remains the same on your destination server. Granted your destination server needs to have CF 7.02 or higher on it.
Hi Derrik,
there is a hot fix from adobe for the bug ‘unexpected url found’..
get the fix – hotfix 2 from adobe site
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb402000
Thanks for making this tutorial, I have been searching for a long time and I finally got my datagrid to work! When you get the chance, I am fairly new to ColdFusion and looking for an example on how to use storedproc and displaying multiple columns to a datagrid would be a great example. Thanks again!
I am getting a blank data grid on my machine… i am using coldfusion built in server to run the app.
Where is the tutorial? I get 404 error.
You are absolutely right. This didn’t get updated when I move my site. I’ll try to move it over tonight.
Ok, the tutorial is back up! Thanks for letting me know.
Kyle,
This was exactly what I have been looking for.
I went thru the tutorial but was not able to get the data to show up in the table on the html page.
I have Flex Builder 3 and CF 9(dev version).
I am working on my desktop – not a web server.
Shouldn’t be a problem because I can get .cfm files to query and ouput data from the cfartgallery data source.
I’ve have gone thu the code with a fine tooth comb looking for typos but it all looks good.
any ideas? thanks.
Very well done tutorial. It helps to go through some of Adobe’s “Flex in a week” training videos to get a feel for Flex for a beginner. I do alot of basic Coldfusion queries and been wanting to use Flex for presentation. Your tutorial is excellant, the kind of step-by-step help that alot of beginner/intermediate coders need, keep up the good work!
Thanks G. Kane!