macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: Data Bind in html

Subject: Re: Data Bind in html
From: "CFSees"
Date: Fri, 17 Aug 2007 23:20:02 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
I am going to give you a simpler example but you would do something like this:



 <!--- Data Calls --->
 <cfset MyQuery = querynew("POID,OrderDate")>
 <cfset queryaddrow(MyQuery)>
 <cfset querysetcell(myQuery,"POID","1")>
 <cfset querysetcell(myQuery,"OrderDate","8/15/2007")>
 <cfset queryaddrow(MyQuery)>
 <cfset querysetcell(myQuery,"POID","2")>
 <cfset querysetcell(myQuery,"OrderDate","8/16/2007")>
 <!--- End of Data Calls --->

 <cfform name="PurchaseForm" action="#cgi.script_name#?postback=2" 
method="post">
 <table align="left">
        <tr>
                <td><font size="-2">PO ID:</font></td>
                <td><cfinput type="Text" name="pid" required="No" visible="Yes" 
enabled="Yes" size="10" bind="{GridData.poid}"></td>
                <td></td>
                <td><font size="-2">Order Date:</font></td>
                <td class="df1" style="position:relative;z-index:2;"><cfinput 
type="datefield" name="oDate" size="15" class="df1" 
bind="{GridData.OrderDate}"></td>
        </tr>
        
        
        <tr><td colspan="5"><hr size="3" style="color:black"></td></tr>
        
        <tr>
                <td colspan="5">
                        <cfgrid name="GridData"  query="MyQuery" format="html" 
autowidth="true" 
fontsize="10">
                                <cfgridcolumn name="poid" header="Product ID" 
select="true" display="true">
                                <cfgridcolumn name="OrderDate" header="Order 
Date">
                        </cfgrid>
                </td>
        </tr>
 </table>
 </cfform>


<Prev in Thread] Current Thread [Next in Thread>