?
Solved

CF7: CFGRIDUPDATE Problem

Posted on 2005-03-02
2
Medium Priority
?
428 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
theamzngq 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 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