Creating an Updateable Grid
Note
If you specify a
cfgriditem
Creating an Updateable Grid
You can build grids to allow users to edit data within them. Users can edit individual
cell data, as well as insert, update, or delete rows. To enable grid editing, you specify
selectmode="edit"
cfgrid
You can use an updateable grid in either of two ways to make changes to your
ColdFusion data sources:
Using
The
require the same level of control.
Navigating and entering data in a grid
Navigating and using the
tips:
tag with a
cfgrid
attributes the grid contains all the columns in the query.
in the
.
Create a page to which you pass the
operations to update data source records base on the form values
cfquery
returned by
.
cfgrid
Pass grid edits to a page that includes the
extracts the form variable values and passes that data directly to the data source.
gives you complete control over interactions with your data source.
cfquery
tag provides a much simpler interface for operations that do not
cfgridupdate
To sort grid rows so that a column is in ascending order by double-clicking the
column header. Double-clicking again sorts the rows in descending order.
To rearrange the columns, click any column heading and drag the column to a
new position.
When you click a cell (or row or column) that you cannot edit, its background
color changes. The default color is a salmon pink.
When you click a cell that you can edit, it is surrounded by a yellow box.
To edit a cell, Double-click it. You must press Return when you finish entering
the data.
To delete a row, click any cell in the row and click the Delete button.
To insert a row, click the Insert button. An empty row appears at the bottom of
the grid. To enter a value in each cell, double-click the cell, enter the value, and
click Return.
attribute defined and no corresponding
query
tag and enable the
cfgrid
cfgrid
cfgridupdate
control is fairly straightforward, but here are a few
cfgrid
or
insert
delete
form variables. In that page perform
tag, which automatically
155
attributes in
Need help?
Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?