Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 830

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Using HTML grids
The ColdFusion HTML
cfgrid
that use bind expressions are paged; as users navigate from page to page of the grid, the grid dynamically gets the data
for only the required page from the data source. You also use bind expressions when you let users edit form contents,
and other ColdFusion controls can bind to the grid. Also, HTML grids provide several JavaScript functions that you
can use to manage and manipulate the grids.
You can also create a static HTML grid by specifying a
grids, all data is initially available.
In HTML mode, if you move the mouse over a column heading, a down arrow button appears. Clicking the button
displays a list with the following options:
• Sort the grid in ascending or descending order based on the column's content.
• Select the columns to display.
• If the grid has a
groupfield
If you specify
selectMode="edit"
the bottom bar. The Insert button opens a new editable row. The Save button commits any changes to the bind source.
The Cancel button rolls back any changes that have not been saved. The Delete button deletes a selected row. You need
not press the Save button after clicking the Delete button.
Dynamically filling form data
HTML grids can dynamically fill the grid data by using a
JavaScript function, or a URL. The bind expression uses bind parameters to specify dynamic information provided by
the grid and the values of any other form field attributes.
Pass the following bind parameters to the bind expression. If you omit any of the parameters in the function call or
URL, you get an error. These parameters send information about the grid and its state to the data provider function.
The data for these parameters is provided automatically. You do not set any values manually.
Parameter name
cfgridpage
cfgridpagesize
cfgridsortcolumn
cfgridsortdirection
Note: The
cfgridsortcolumn
sorted the grid, for example, by clicking a grid column header.
For more information on binding and bind parameters, see
in the CFML Reference.
You can use optional parameters to specify additional information to pass to the called function. These parameters
provide data that the called function requires to determine the data to return. For example, if the function returns the
cities in a state, you would pass it the state name. Any or all of the optional function parameters can be bind parameters.
A state name, for example, could come from the selection in a states
control lets you use a bind expression to dynamically populate the grid. HTML grids
cfgrid
attribute: turn grouping off and on and group by the column value.
for an HTML grid, the grid displays Insert, Save, Cancel, and Delete buttons to
bind
Description
The number of the page for which to retrieve data.
The number of rows of data in the page. The value of this parameter is the value of the
attribute.
The name of the column that determines the sorting order of the grid. This value is set only after the user
clicks a column heading.
The direction of the sort, may be 'ASC' (ascending) or 'DESC' (descending). This value is set only after the
user clicks a column heading.
and
cfgridsortdirection
Last updated 1/20/2012
tag that does not use a bind expression. With static
attribute with a bind expression that calls a CFC or
parameters can be empty if the user or application has not
"Using Ajax Data and Development
control.
cfselect
825
pageSize
Features" on page 858

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents