ColdFusion Query to Flex DataGrid

This post is more than 2 years old.

Kyle Hayes has posted an excellent captivate demo that walks you through hooking up a Flex DataGrid to a ColdFusion query. He covers the complete process from Flex Project creation to writing the ColdFusion CFC. This is an excellent demonstration for folks who are having a hard time wrapping their head around the process.

Captivate Tutorial: Viewing a ColdFusion Query in a Flex DataGrid

By the way - Captivate is incredibly useful. I've used it before and creating tutorials is about as easy as hitting record and just clicking and talking.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Daz posted on 4/18/2007 at 2:16 AM

great tutorial, what i'd really like to see is a tutorial on roundtrip submitting a record back to coldfusion as well i've got a basic app which entails a table for viewing records than a detail section to update the values back to the db its currently cf/html but i'd reaaly like to do it in flex then compile it into apollo

Comment 2 by Sam posted on 9/6/2007 at 2:44 PM

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.

Comment 3 by George Smith posted on 12/12/2007 at 5:17 AM

I Concure (probably miss spelled) with DAZ. I need to see an example of a datagrid updating a DB (SQL using CF7) soooo bad. I have been looking at this for months

Comment 4 by Daz posted on 12/12/2007 at 5:56 AM

actually this is really easy, its the same as requesting data you just have to send the data back as a variable similar to coldfusion cfinvoke

Comment 5 by George Smith posted on 1/24/2008 at 12:02 AM

Nope. not like that at all. I want to edit a bunch of rows and send that back to the CFC. No where do I see a sample of how to update the DB like that. I have no problem using form fields and adding editing data in one row but to edit a bunch of records in the grid and send that seems impossible (I know its not) no one can seem to showm me. AND I HAVE BEEN ON THIS FOR MONTHS!!!

Comment 6 by Raymond Camden posted on 1/24/2008 at 12:40 AM

No need to shout George. :)

So basically you saying you want the ability to edit N rows, and then commit the changes back to the server?

Comment 7 by George Smith posted on 1/24/2008 at 12:55 AM

My needs are a little more complicated, but I think just knowing how to edit a bunch of rows and press a submit button that would then add the rows to a db. would help

basically I have a query that brings in some data. The edit part is just checkboxs in a column. some get checked and then press "send" a different table then would recieve the checked records.

This is what I have so far...

Everything works except the checked records dont get added to the db.table

Thanks for looking

Comment 8 by Raymond Camden posted on 1/24/2008 at 10:54 PM

Well, I'd suggest reading up more on Flash Remoting w/n Flex. This is how you would both get and send data. Sending data is just as simple as getting data, you just pass in the arguments. In you case, you would be sending the changed data.

Comment 9 by George Smith posted on 1/24/2008 at 11:05 PM

Thanks for the response. I have read alot about remoting. I actually do have data records getting added to a db table. If you checked out my app. There is a grid that has a column of check boxs. below that is a "program area" this is whats going on in a peticular group (the accounts checked) of accounts. So a user selects some accounts then adds the program information at the bottom then send. What I get in my DB.table is the program information. Works Great! My big problem is that I cannot seem to get the checked accounts. So that a record in the DB.Table would contain the account number from the grid and the program info. The next record that has a check would contain a different account number from the grid and the same program info. and so on... Not sure if you can help me with this, but since you are responding and I have considered you one of the CF greats (I think I even took a class from you a long time ago)I better see what I can learn. Thanks George

Comment 10 by Raymond Camden posted on 1/24/2008 at 11:58 PM

Ah - no - sorry - I can't provide much help now. Problem of too much stuff to do and too little time. :)

Comment 11 by Renee posted on 2/14/2008 at 9:32 PM

Here is a tutorial for updating a table using a datagrid in Flex:

Updates are made after the user finishes editing a cell in the datagrid.