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

Developing coldfusion mx applications
Table of Contents

Advertisement

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
[change_index]
gridname.RowStatus.Action
[change_index]
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:
The original values for all columns
The new column values
The type of change
For example, the following arrays are created if you update a
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 ]
The value of change_index increments for each row that changes, and does not indicate the
specific row number. When the user updates data or inserts or deletes rows, the action page gets
one array for each changed column, and the RowStatus.Action array. The action page does not get
arrays for unchanged columns.
If the user makes a change to a single cell in col2, you can access the edit operation, the original
cell value, and the edited cell value in the following arrays:
Form.mygrid.RowStatus.Action[1]
Form.mygrid.col2[1]
Form.mygrid.original.col2[1]
If the user changes the values of the cells in col1 and col3 in one row and the cell in col2 in
another row, the information about the original and changed values is in the following array
entries:
Form.mygrid.RowStatus.Action[1]
Form.mygrid.col1[1]
Form.mygrid.original.col1[1]
Form.mygrid.col3[1]
Form.mygrid.original.col3[1]
Form.mygrid.RowStatus.Action[2]
Form.mygrid.col2[2]
Form.mygrid.original.col2[2]
600
Chapter 27: Building Dynamic Forms
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.
cfgrid
called "mygrid" consisting of

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents