Wednesday, January 09, 2008

Binding to an HTML cfgrid

Wanna bind to an HTML cfgrid, and having trouble finding the correct syntax? Here it is:


I searched for a couple of hours, and could only find the flash forms syntax. Then I found it documented here:

Here is an example using cfinput to bind to the cfgrid :

<cfgrid name="user_grid" query="get_users">
<cfgridcolumn name="last_name">
<cfgridcolumn name="first_name">
<cfgridcolumn name="age">

<cfinput type="text" name="the_last_name" bind="{user_grid.last_name}">

There you go. Enjoy.


jones said...

Nice blog...
visit also coldfusion example

Andrew said...

Thank you :)

Anonymous said...

Thanks very useful. How can I do the same thing with a cfgrid but bind a cfselect? Thanks