Question
Updating CFGrid using cfquery
Hello,
I am trying to have a dynamic cfgrid that changes content based on a form button click.
Here's what i am trying to do:
I have a cfquery defined and this is bind to the cfgrid
<cfquery name="GetParks" ..>
SQL QUERY
</cfquery>
<cfgrid name="listingGrid" query="GetParks" rowheaders="false" maxRows="50" height=480 selectMode="EDIT">
All is well so far. In the same uber-form is contained a button with a onclick function
<cfformgroup type="horizontal" style="horizontalAlign:center">
<cfinput type="button" name="submit" value="Update Screen" onclick="submitSearch()" />
In submitSearch() function, I am trying to create a new query and assigning the output to cfgrid to update:
function submitSearch():Void
{
var listingGrid:mx.controls.DataGrid = listingGrid;
<cfquery name="updatequery"> ... </cfquery>
listingGrid = ***HOW DO I ASSIGN THE OF THE NEW updatequery **?
}
Thanks in advance,