<CFGRIDCOLUMN NAME="column_name"
    HEADER="header"
    WIDTH="column_width"
    FONT="column_font"
    FONTSIZE="size"
    ITALIC="Yes/No"
    BOLD="Yes/No"
    HREF="URL"
    HREFKEY="column_name"
    TARGET="URL_target"
    SELECT="Yes/No"
    DISPLAY="Yes/No"
    TYPE="type"
    HEADERFONT"font_name"
    HEADERFONTSIZE="size"
    HEADERITALIC="Yes/No"
    HEADERBOLD="Yes/No"
    DATAALIGN="position"
    HEADERALIGN="position"
    NUMBERFORMAT="format">


Used with CFGRID in a CFFORM, you use CFGRIDCOLUMN to specify individual column data in a CFGRID control. Font and alignment attributes used in CFGRIDCOLUMN override any global font or alignment settings defined in CFGRID.

NAME

Required. A name for the grid column element. If the grid uses a query, the column name must specify the name of a query column.

HEADER

Optional. Text for the column header. The value of HEADER is used only when the CFGRID COLHEADERS attribute is Yes (or omitted, since it defaults to Yes).

WIDTH

Optional. The width of the column in pixels. By default the column is sized based on the longest column value.

FONT

Optional. Font name to use for data in the column. Defaults to browser-specified font.

FONTSIZE

Optional. Font size for text in the column. Defaults to browser-specified font size.

ITALIC

Optional. Yes or No. Yes presents text in the column in italic. Default is No.

BOLD

Optional. Yes or No. Yes presents text in the column in boldface. Default is No.

HREF

Optional. URL to associate with the grid item. You can specify a URL that is relative to the current page:

Or an absolute URL:

HREFKEY

Optional. The name of a valid query column when the grid uses a query. The column specified becomes the Key no matter what the select mode is for the grid.

TARGET

Optional. The name of the frame in which to open the link specified in HREF.

SELECT

Optional. Yes or No. Yes allows end users to select a column in a grid control. When No, the column cannot be edited, even if the CFGRID INSERT or DELETE attributes are enabled. The value of the SELECT attribute is ignored if the CFGRID SELECTMODE attribute is set to Row or Browse.

DISPLAY

Optional. Yes or No. Use to hide columns. Default is Yes to display the column.

TYPE

Optional. Enter Image, Numeric, or String_NoCase. When TYPE="Image", the grid attempts to display an image corresponding to the value in the column, which can be a built in ColdFusion image name, or an image of your choice in the cfide\classes directory or a subdirectory, referenced with a relative URL. Built- in image names are as follows:

HEADERFONT

Optional. Font to use for the column header. Defaults to browser-specified font.

HEADERFONTSIZE

Optional. Font size to use for the column header in pixels. Defaults to browser- specified font size.

HEADERITALIC

Optional. Yes or No. Yes presents column header text in italic. Default is No.

HEADERBOLD

Optional. Yes or No. Yes presents header text in boldface. Default is No.

DATAALIGN

Optional. Alignment for column data. Valid entries are: Left, Center, or Right. Default is Left.

HEADERALIGN

Optional. Alignment for the column header text. Valid entries are: Left, Center, or Right. Default is Left.

NUMBERFORMAT

Optional. The format for displaying numeric data in the grid.

NumberFormat Mask Characters
Character Meaning
_ (underscore) Optional digit placeholder.
9 Optional digit placeholder. Same as _, but shows decimal places more clearly.
. Specifies the location of a mandatory decimal point.
0 Located to the left or right of a mandatory decimal point, to force padding with zeros.
( ) Places parentheses around the mask if the number is less than 0.
+ Places + in front of positive numbers, - (minus sign) in front of negative numbers.
- Place " " (space) in front of positive, - (minus sign) in front of negative numbers.
, Separates thousands with commas.
L,C Specifies left-justify or center-justify a number within the width of the mask column. L or C must appear as the first character of the mask. By default, numbers are right-justified.
$ Places a dollar sign in front of the formatted number. $ must appear as the first character of the mask.
^ Separates left from right formatting.