MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 602

Developing coldfusion mx applications
Table of Contents

Advertisement

The following figure shows the output of this code:
The following sections describe how to write handle_grid.cfm to process user edits to the grid.
Reviewing the code
The following table describes the code and its function:
Code
<cfgrid name="employee_grid"
height=425
width=300
vspace=10
selectmode="edit"
query="empdata"
insert="Yes"
delete="Yes">
<cfgridcolumn name="Emp_ID"
header="Emp ID"
width=50
headeralign="center"
headerbold="Yes"
select="No">
<cfgridcolumn name="LastName"
header="Last Name"
width=100
headeralign="center"
headerbold="Yes">
<cfgridcolumn name="Dept_ID"
header="Dept"
width=35
headeralign="center"
headerbold="Yes">
602
Chapter 27: Building Dynamic Forms
Description
Populates a
control with data from the empdata query.
cfgrid
Selecting a grid cell enables you to edit it. You can insert and
delete rows. The grid is 425 X 300 pixels and has 10 pixels of
space above and below it.
Creates a 50-pixel wide column for the data in the Emp_ID
column of the data source. Center a header named Emp ID and
make it bold.
Does not allow users to select fields in this column for editing.
Since this field is the table's primary key, users should not be
able to change it for existing records and the DBMS should
generate this field as an autoincrement value.
Creates a 100-pixel wide column for the data in the LastName
column of the data source. Center a header named Last Name
and make it bold.
Creates a 35-pixel wide column for the data in the Dept_ID
column of the data source. Center a header named Dept and
make it bold.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents