Groups | Blog | Home
all groups > coldfusion flash integration > march 2005 >

coldfusion flash integration : Cfgrid to display search results



grice
3/15/2005 1:45:49 PM
I'm using Cfform format = flash. I have 2 search fields, and a button. When a
user enters their search query, and hit submit, I want to populate my cfgrid
with the results. Can anyone give me some insight on how to pull this off?
Thanks -GR
dbenitez
3/24/2005 12:00:00 AM
I did this piece of code really quick, i hope it can help you.

-Diego Benitez


<cfform action="#cgi.SCRIPT_NAME#" name="search" method="post">
<cfformgroup type="vertical">
<cfformgroup type="horizontal">
<cfinput name="fiel1" label="Field1: "><cfinput name="field2" label="Field2: ">
</cfformgroup>
<cfinput name="Search" type="submit" value="Search">
<cfif isdefined('form.search')>
<cfquery name="LookUp" datasource="datasource">
SELECT * FROM table WHERE column1 LIKE '%#form.field1#%' and column2 LIKE
'%#form.field2#%'
</cfquery>
<cfgrid query="LookUp" name="SrchGrid"></cfgrid>
</cfif>
</cfformgroup>
</cfform>
grice
3/24/2005 2:11:15 PM
AddThis Social Bookmark Button