Adobe ColdFusion 8

Controlling cell contents

You can control the data that a user can enter into a cfgrid cell in the following ways:

  • By default, a cell is not editable. Use the cfgrid attribute selectmode="edit" to edit cell contents.
  • Use the cfgridcolumn type attribute to control sorting order, to make the fields check boxes, or to display an image.
  • Use the cfgridcolumn values attribute to specify a drop-down list of values from which the user can choose. You can use the valuesDisplay attribute to provide a list of items to display that differs from the actual values that you enter in the database. You can use the valuesDelimiter attribute to specify the separator between values in the values valuesDisplay lists.
  • Although the cfgrid tag does not have a validate attribute, it does have an onValidate attribute that lets you specify a JavaScript function to perform validation.

For more information on controlling the cell contents, see the attribute descriptions for the cfgridcolumn tag in the CFML Reference.