Populating A Grid From A Query - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

136

Populating a grid from a query

To populate a grid from a query:
1.
Open a new file named
2.
Edit the file so that it appears as follows:
<CFQUERY NAME="empdata" DATASOURCE="CompanyInfo">
</CFQUERY>
<CFFORM NAME="Form1" ACTION="submit.cfm" METHOD="Post">
<BR><INPUT TYPE="Submit" VALUE="Submit">
</CFFORM>
Note
3.
Save the file and view it in your browser.
grid1.cfm
SELECT * FROM Employees
<CFGRID NAME="employee_grid" QUERY="empdata"
SELECTMODE="single">
<CFGRIDCOLUMN NAME="Employee_ID">
<CFGRIDCOLUMN NAME="LastName">
<CFGRIDCOLUMN NAME="Department_ID">
</CFGRID>
Use the CFGRIDCOLUMN DISPLAY="No" attribute to hide columns
you want to retrieve from a data source but not expose to an end
user.
Developing Web Applications with ColdFusion
in Studio.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents