Used with the cfgrid
tag in a cfform
. Use this tag to specify column data in a cfgrid
control. The font and alignment attributes used in cfgridcolumn
override global font or alignment settings defined in cfgrid
.
<cfgridcolumn
name = "column_name"
header = "header"
width = "column_width"
font = "column_font"
fontSize = "size"
italic = "Yes" or "No"
bold = "Yes" or "No"
textColor = "web color" or "expression"
bgColor = "web color" or "expression"
href = "URL"
hrefKey = "column_name"
target = "URL_target"
select = "Yes" or "No"
display = "Yes" or "No"
type = "type"
headerFont = "font_name"
headerFontSize = "size"
headerItalic = "Yes" or "No"
headerBold = "Yes" or "No"
headerTextColor = "web color"
dataAlign = "position"
headerAlign = "position"
numberFormat = "format"
values = "Comma separated strings and/or numeric range"
valuesDisplay = "Comma separated strings and/or numeric range"
valuesDelimiter = "delimiter character">
cfgrid
,
cfgridrow
,
cfgridupdate
,
cfapplet
,
cfform
,
cfinput
,
cfselect
,
cfslider
,
cftextinput
,
cftree
ColdFusion MX: Changed behavior if select = "no"
: a user cannot select and edit the cell data, regardless of the cfgrid selectmode
attribute value. When clicked, the cell border (and, depending on the selectColor
value, the cell background) changes color, but the cell data cannot be edited.
Attribute | Req/Opt | Default | Description |
---|---|---|---|
name |
Required |
|
Name of grid column element. If grid uses a query, column name must specify name of a query column. |
header |
Optional |
Yes |
Column header text. Used only if |
width |
Optional; see Description |
Column head width |
Column width, in pixels. |
font |
Optional |
As specified by |
Font of data in column. |
fontSize |
Optional |
As specified by |
Size of text in column. |
italic |
Optional |
As specified by |
|
bold |
Optional |
As specified by |
|
textColor |
Optional |
|
Color of grid element text in column, or an expression to manipulate color; hex or text. To enter hex value, use the form You can enter an expression; for example:
This means: If value in Column 2 is less than 0, display value in red; otherwise, display value in pink. See Using expressions in textColor and bgColor attributes.
|
bgColor |
Optional |
|
Color of background of grid column, or an expression to manipulate color. See Using expressions in textColor and bgColor attributes.
|
href |
Optional |
|
URL o r query column name that contains a URL to hyperlink each grid column with. |
hrefKey |
Optional |
|
The query column to use for the value appended to the |
target |
Optional |
|
Frame in which to open link specified in |
select |
Optional |
|
|
display |
Optional |
Yes |
|
type |
Optional |
|
- cd - computer - document - element - folder - floppy - fixed - remote
|
headerFont |
Optional |
as specified by |
Column header font |
headerFontSize |
Optional |
as specified by |
Column header text size, in pixels |
headerItalic |
Optional |
as specified by |
|
headerBold |
Optional |
as specified by |
|
headerTextColor |
Optional |
|
Color of grid control column header text.
|
dataAlign |
Optional |
as specified by |
Column data alignment:
|
headerAlign |
Optional |
as specified by |
Column header text alignment:
|
numberFormat |
Optional |
|
Format for displaying numeric data in grid. See numberFormat mask characters. |
values |
Optional |
|
Formats cells in column as drop-down list boxes; specify items in drop-down list. Example:
|
valuesDisplay |
Optional |
|
Maps elements in values attribute to string to display in drop-down list. Delimited strings and/or numeric range(s). |
valuesDelimiter |
Optional |
, [comma] |
Delimiter in |