View comments | RSS feed
Contents > CFML Reference > ColdFusion Tags > cfgridcolumn PreviousNext

cfgridcolumn

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.

Forms tags

<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 cfgrid colHeaders = "Yes".

width

Optional; see Description

Column head width

Column width, in pixels.

font

Optional

As specified by cfgrid

Font of data in column.

fontSize

Optional

As specified by cfgrid

Size of text in column.

italic

Optional

As specified by cfgrid

  • Yes: displays grid control text in italics
  • No

bold

Optional

As specified by cfgrid

  • Yes: displays grid control text in bold
  • No

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 "##xxxxxx", where x = 0-9 or A-F; use two pound signs or none.

You can enter an expression; for example:

textColor= "(C2 LT 0 ? red : pink)"

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.

  • Any color, in hex format
  • Black
  • Red
  • Blue
  • Magenta
  • Cyan
  • Orange
  • Darkgray
  • Pink
  • Gray
  • White
  • Lightgray
  • Yellow

bgColor

Optional

 

Color of background of grid column, or an expression to manipulate color.

See Using expressions in textColor and bgColor attributes.

  • Options: same as for textColor attribute

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 href URL of each column, instead of the column's value.

target

Optional

 

Frame in which to open link specified in href.

select

Optional

 

  • Yes: user can select the column in grid control.
  • No: user cannot edit column, regardless of cfgrid insert and delete values. If cfgrid selectMode = "Row" or "Browse", this value is ignored.

display

Optional

Yes

  • Yes
  • No: hides column

type

Optional

 

  • image: grid displays image that corresponds to value in column (a built-in ColdFusion image name, or an image in cfide\classes directory or subdirectory referenced with relative URL). If image is larger than column cell, it is clipped to fit. Built-in image names are as follows:

- cd

- computer

- document

- element

- folder

- floppy

- fixed

- remote

  • numeric: user can sort grid data numerically
  • boolean: column displays as check box; if cell is editable, user can change checkmark
  • string_noCase: user can sort grid data as case-insensitive text

headerFont

Optional

as specified by cfgrid

Column header font

headerFontSize

Optional

as specified by cfgrid

Column header text size, in pixels

headerItalic

Optional

as specified by cfgrid

  • Yes: displays column header in italics
  • No

headerBold

Optional

as specified by cfgrid

  • Yes: displays header in bold
  • No

headerTextColor

Optional

 

Color of grid control column header text.

  • Options: same as for textColor attribute

dataAlign

Optional

as specified by cfgrid

Column data alignment:

  • Left
  • Right
  • Center

headerAlign

Optional

as specified by cfgrid

Column header text alignment:

  • Left
  • Right
  • Center

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:

values = "arthur, scott, charles, 1-20, mabel"

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 values and valuesDisplay attributes.


Contents > CFML Reference > ColdFusion Tags > cfgridcolumn PreviousNext

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


BlueSpline said on Sep 27, 2004 at 3:26 AM :
Don't seem to be able to select multiple values from the values list. eg by SHIFT+CLICK or CTRL+CLICK
Electric said on Jan 26, 2005 at 11:15 AM :
When using an expression for bgcolor on cfgridcolumn, it appears to require the column on which the expression is evaluated to be set with display="yes". Too bad.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-p51.htm