156
Controlling cell contents
The
you control the data that a user can enter into a
For more information on controlling the cell contents, see the attribute descriptions
in the CFML Reference.
How user edits are returned
ColdFusion creates the following arrays as Form variables to return edits to grid rows
and cells:
Array reference
gridname.colname[change_index]
gridname.Original.colname
gridname.RowStatus.Action
When a user selects and changes data in a row, ColdFusion creates arrays to store the
following information for rows that are updated, inserted, or deleted:
For example, the following arrays are created if you an update a
"mygrid" consisting of two displayable columns, (col1, col2) and one hidden column
(col3).
Form.mygrid.col1[ change_index ]
Form.mygrid.col2[ change_index ]
Form.mygrid.col3[ change_index ]
Form.mygrid.original.col1[ change_index ]
Form.mygrid.original.col2[ change_index ]
Form.mygrid.original.col3[ change_index ]
Form.mygrid.RowStatus.Action[ change_index ]
cfgridcolumn type
By default, a cell is an editable text field.
Use the
attribute to require numeric or string data, to make the fields check
type
boxes, or to display an image.
Use the
attribute to specify a drop-down list of values from which the user
values
can chose. You can use the
display that differs from the actual values that you enter in the database. You can
use the
valuesDelimiter
values valuesDisplay
While
does not have a
cfgrid
attribute that lets you specify a JavaScript function to perform validation.
[change_index]
[change_index]
The original values for all columns
The new column values
The type of change
,
,
value
valuesDisplay,
valuesDisplay
attribute to specify the separator between values in the
lists.
attribute, it does have an
validate
Description
Stores the new value of an edited cell.
Stores the original value of the edited grid cell.
Stores the edit type made to the edited grid
row: D for delete, I for insert, or U for update.
Chapter 9 Building Dynamic Forms
and
valuesDelimiter
cell in the following ways:
cfgrid
attribute to provide a list of items to
cfgrid
attributes let
onvalidate
called
Need help?
Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?
Questions and answers