![]() ![]() ![]() |
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.
<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">
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.
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).
Optional. The width of the column in pixels. By default the column is sized based on the longest column value.
Optional. Font name to use for data in the column. Defaults to browser-specified font.
Optional. Font size for text in the column. Defaults to browser-specified font size.
Optional. Yes or No. Yes presents text in the column in italic. Default is No.
Optional. Yes or No. Yes presents text in the column in boldface. Default is No.
Optional. URL to associate with the grid item. You can specify a URL that is relative to the current page:
../mypage.cfm
Or an absolute URL:
http://myserver.com/mydir/mypage.cfm.
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.
Optional. The name of the frame in which to open the link specified in HREF.
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.
Optional. Yes or No. Use to hide columns. Default is Yes to display the column.
Optional. Enter Image or Numeric. 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:
If an image is larger than the column cell where it is being placed, the images is clipped to fit the cell.
When TYPE="Numeric", data in the grid can be sorted by the end user as numeric data rather than as simple character text.
Optional. Font to use for the column header. Defaults to browser-specified font.
Optional. Font size to use for the column header in pixels. Defaults to browser-specified font size.
Optional. Yes or No. Yes presents column header text in italic. Default is No.
Optional. Yes or No. Yes presents header text in boldface. Default is No.
Optional. Alignment for column data. Valid entries are: Left, Center, or Right. Default is Left.
Optional. Alignment for the column header text. Valid entries are: Left, Center, or Right. Default is Left.
Optional. The format for displaying numeric data in the grid.
Mask characters you can use in the NUMBERFORMAT attribute correspond with those used in the NumberFormat CFML function. For more information about the NumberFormat function, see Chapter 3, ColdFusion Functions.
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. |
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.