Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

CF7: CFGRIDUPDATE Problem

Posted on 2005-03-02
2
Medium Priority
?
429 Views
Last Modified: 2013-12-24
I am using CF7 to create a Flash format grid where users can enter data.  Once any modifications are done the user click a button.  The problem I am having is two-fold:

1. The update to the database is ocurring, but when the page reloads the changes are not showing in the page.  The sequence of events is: user enters data, presses the submit changes button, the page reloads, I get the "page inializing" flash screen but the data isn't there.  If I hit the refresh button it will show up.

2. Any values that were not changed for that row and were originally blank now appear as "null".  I would rather it be blank so that the user can quickly see where they are missing data.
0
Comment
Question by:skibama1
2 Comments
 
LVL 2

Accepted Solution

by:
David Williamson earned 2000 total points
ID: 13451437
I had a similar problem.  When I started setting up my first flash cfgrid, I used the example on Macromedia's site as a starting point.  In their example, the query that populates the grid came before the section that would normally update the changes.  That means that when the flash grid was created, the changes had not yet been saved, like this:

<cfquery name="getStaff" datasource="wrightdb">
    select * from Staff where status = 1
       order by firstname
</cfquery>

<cfif isDefined("form.btn")>
*update your table code here*
</cfif>

This is how their example code is set up.  That is why when you reload the page, the change are there; they were updated to the database just after the cfgrid was populated.  So, I just put the update code before the query that the grid is based on, like this:

<cfif isDefined("form.btn")>
      <cfgridupdate grid="staffGrid" datasource="wrightdb" tablename="Staff">
</cfif>

<cfquery name="getStaff" datasource="wrightdb">
    select * from Staff where status = 1
       order by firstname
</cfquery>

Now the changes are saved to the table BEFORE the flash grid is populated.

That's my answer for number 1, I'll look into number two...
0
 
LVL 1

Author Comment

by:skibama1
ID: 13459408
Ahh, that makes sense.  Waiting on your response for #2 but I will defintely award you the points for the first part.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question