Description

Lets you define a cfgrid control that does not use a query as source for row data. If a query attribute is specified in the cfgrid tag, the cfgridrow tags are ignored.

Category

Forms tags

Syntax

<cfgridrow
data = "col1, col2, ..."
delimiter = "delimiter character">

Note: You can specify this tag's attributes in an attributeCollection attribute whose value is a structure. Specify the structure name in the attributeCollection attribute and use the tag's attribute names as structure keys.

See also

cfgridcfgridcolumncfgridupdatecfformcfinputcfselectcfslidercftextareacftree

Attributes

Attribute

Req/Opt

Default

Description

data

Required

 

Delimited list of column values. If a value contains a delimiter character, it must be escaped with another delimiter character.

delimiter

Optional

, (comma)

Separator between column values.

Example

The following example shows how you use the cfgridrow tag can populate a cfgrid tag from list data:

<!--- Set two lists, each with the data for a grid column. ---> 
<cfset cities = "Rome,Athens,Canberra,Brasilia,Paris"> 
<cfset countries = "Italy,Greece,Australia,Brazil,France"> 

<cfform name = "cities"> 
<cfgrid name="GeoGrid" autowidth = "yes" vspace = "4" height = "120" 
font="tahoma" rowheaders="no"> 
<cfgridcolumn name="City" header="City"> 
<cfgridcolumn name="Country" header="Country"> 
<!--- Loop through the lists using cfgridrow to poplulate the grid. ---> 
<cfloop index="i" from="1" to="#ListLen(cities)#"> 
<cfgridrow data ="#ListGetAt(cities, i)#,#ListGetAt(countries, i)#"> 
</cfloop> 
</cfgrid><br><br> 
</cfform>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy