Skip to main content
Inspiring
January 31, 2012
Question

CFGRID, updating records, reselecting records not refreshing and showing updates

  • January 31, 2012
  • 1 reply
  • 854 views

I have a cfgrid that has minimal information - an id, type, title, status and status_date.

   <cfgrid name="allopengrid" align="left" query="all_open" insert="No" delete="No" sort="Yes"

    font="Arial" fontsize="10" bold="No" italic="No" appendkey="Yes" highlighthref="Yes"

    griddataalign="LEFT" gridlines="Yes" rowheaders="No" colheaders="Yes" colheaderalign="Center"

    colheaderfont="Arial" selectColor="##778899" colheaderitalic="No" colheaderbold="Yes"

    selectmode="Row" picturebar="Yes" height="350" width="900">

   <cfgridcolumn name="request_id" header="Log ID" width="100" display="Yes" dataalign="Center" fontsize="15"      href="index.cfm?fuseaction=SelectOpenRequest" select="Yes">   

   <cfgridcolumn name="request_type" header="Type" width="100" display="Yes" dataalign="Center" fontsize="15" select="No">   

   <cfgridcolumn name="request_title" header="Title" width="450" display="Yes" dataalign="LEFT" fontsize="15" select="No">

   <cfgridcolumn name="Status" header="Status" width="120" fontsize="15" select="No">

   <cfgridcolumn name="commit_date" header="Commit Date" width="130" fontsize="15" select="No">

  </cfgrid>

The user can select a record by id (cfset Session.RequestId="#ListGetAt(url.cfgridkey,1)#") and can update the rest of the record.  When the record has been updated and saved, the user is then returned back to the cfgrid.  If the status or status_date have been changed, the grid reflects the updates.  The problem occurs when the user then re-selects the same record by id for any other updated field.  The update form appears as though no updates have occurred to the  record (but if you click on the internet 'refresh button', the record with refresh'). 

Any ideas on how to render an updated query set for the detail record?  I am running CF 9.0.1 on Windows 2003 Server using Access (I know, I know - I'm still developing and will convert to MS SQL Server for a DB when I go live). 

Thanks in advance for any suggestions.

Libby H.

    This topic has been closed for replies.

    1 reply

    Libby_HAuthor
    Inspiring
    February 3, 2012

    I've made some progress but am perplexed on the outcome.

    I figured that since the fields that are showing the updates are on the grid, then I should include all of the record on the grid. So, I included all of the fields from the record (23 of them) and used the display="No" on the cfgridcolumn for the ones that I did not want shown on the grid.  That didn't seem to make any difference.  For grins, I changed one of the display="No" to display="Yes" and updated the record.  Yes the column shows on the grid updated, and the field also updates on the detail record (no need to refresh once selecting the record). 

    I would have figured that just putting the fields on the grid with display="No" would do the trick, not having to actually showing the fields on the grid.  Any ideas?