|
DescriptionManually
refreshes a displayed grid.
Function syntaxColdFusion.Grid.refresh(name [, preservePage])
HistoryColdFusion
8: Added this function
Parameters
Parameter
|
Description
|
name
|
The value of the name attribute
of the cfgrid tag to refresh.
|
preservePage
|
A Boolean value specifying whether to redisplay
the current page of data (true), or display the
first page of data (false, the default). This attribute
applies only if the grid data requires multiple grid pages to display.
|
ReturnsThis
function does not return a value.
UsageThis
function is useful to refresh a grid when an event occurs that changes
the underlying data but does not normally trigger a grid update.
ExampleThe
following code snippet comes from an example that lets users delete
rows from a grid. When the user selects a grid row and clicks the
delete button, the Ajax proxy calls a mycfc.deleteRow function
to delete the row from the database. When the function returns successfully,
the proxy calls ColdFusion.Grid.refresh to update
the grid and remove the row.
<cfajaxproxy bind="cfc:mycfc.deleteRow({deletebutton@click},{mygrid.id@none}"
onSuccess="ColdFusion.Grid.refresh('mygrid', true)">
|
|
|