Skip to main content
Participant
October 26, 2006
Question

cfgridupdate don't find grid parameter.. error

  • October 26, 2006
  • 6 replies
  • 856 views
I use this code that I've found in the reference but when i try to insert a new record coldfusion give me this error:

"cfgridupdate could not find the grid named FirstGrid"

So, i write a new code with cfgrid and cfgridupdate but coldfusion give me always the same error.

but FirstGrid is the cfgrid name parameter passed to the page for the cfgridupdate tag? I use CFMX 7.02 and win XP SP 2 with Fiirefox 1.5.07

Thank you

Alessandro

(Sorry for my bad english!!! 😞 )

<!--- If the gridEntered form field exists, the form was submitted.
Perform gridupdate. --->
<cfif IsDefined("form.gridEntered") is True>
<cfgridupdate grid = "FirstGrid" dataSource = "cfdocexamples" Keyonly="true"
tableName = "CourseList">
</cfif>
<!--- Query the database to fill up the grid. --->
<cfquery name = "GetCourses" dataSource = "cfdocexamples">
SELECT Course_ID, Dept_ID, CorNumber,
CorName, CorLevel, CorDesc
FROM CourseList
ORDER by Dept_ID ASC, CorNumber ASC
</cfquery>
<h3>cfgrid Example</h3>
<I>Try adding a course to the database, and then deleting it.</i>
<cfform>
<cfgrid name = "FirstGrid" width = "450"
query = "GetCourses" insert = "Yes" delete = "Yes"
font = "Tahoma" rowHeaders = "No"
colHeaderBold = "Yes"
selectMode = "EDIT"
insertButton = "Insert a Row" deleteButton = "Delete selected row" >
</cfgrid><br>
<cfinput type="submit" name="gridEntered">
</cfform> Text Text cfgridupdate could not find the grid named FirstGrid.
This topic has been closed for replies.

6 replies

Inspiring
October 27, 2006
Eureka! I find the error
In my application.cfc i writed this

<cfset SetLocale("Italian (standard)")>
<cfset SetEncoding("FORM","ISO-8859-2")>
<cfset SetEncoding("URL", "ISO-8859-2")>

<!--- Trim form variables --->
<cfif NOT StructIsEmpty(form)>
<cfloop collection="#form#" item="formField">
<cfset form[formField]=Trim(form[formField])>
</cfloop>
</cfif>

the cfform run only in utf-8, if i disable this row the form run correctly!
Yeah, it's a good day!!!
Ale



"Alessandro Adami" <alessandro.adami@gggmail.com> ha scritto nel messaggio
news:eht8og$88o$1@forums.macromedia.com...
> Bleach! I use cfgrid because I must update/insert/delete a lots of column,
> i write the "Divina Commedia" with the code of the example.
> Thank you *mista*, now i search my Beretta!
> Goodbye!
>
>
> "*mista*" <webforumsuser@macromedia.com> ha scritto nel messaggio
> news:eht7fs$6pg$1@forums.macromedia.com...
>> If on your local computer the cfgrid tag works but you're having problems
>> with
>> cfgridupdate tag, try update using cfquery and SQL statements. Read
>> details on
>> the link below
>>
>> http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Application
>> s_with_CFML/dynamicForms7.htm
>>
>> If updating using cfquery works, then maybe use that
>>
>
>


Inspiring
October 27, 2006
Bleach! I use cfgrid because I must update/insert/delete a lots of column, i
write the "Divina Commedia" with the code of the example.
Thank you *mista*, now i search my Beretta!
Goodbye!


"*mista*" <webforumsuser@macromedia.com> ha scritto nel messaggio
news:eht7fs$6pg$1@forums.macromedia.com...
> If on your local computer the cfgrid tag works but you're having problems
> with
> cfgridupdate tag, try update using cfquery and SQL statements. Read
> details on
> the link below
>
> http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Application
> s_with_CFML/dynamicForms7.htm
>
> If updating using cfquery works, then maybe use that
>


Inspiring
October 27, 2006
If on your local computer the cfgrid tag works but you're having problems with cfgridupdate tag, try update using cfquery and SQL statements. Read details on the link below
http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Applications_with_CFML/dynamicForms7.htm

If updating using cfquery works, then maybe use that
Inspiring
October 27, 2006
> Is the grid displaying when you preview the page in a browser. The CFGRID
> works
> on JAVA platform and if java is disabled, or the correct version is not
> there,
> it wouldn't show.
> Are you able to see the grid and the data etc in the browser.

Yes, i see the flash grid, with all data in the database. It works
correctly. Only after the submit coldfusion display me the cfgridupdate
error.
If you want here there is the on-line example
www.studiorighetti.it/formflash.cfm.
On-line it's all ok, not on my localhost. I think that there are some
problems on my machine!

Ale


Inspiring
October 27, 2006
Is the grid displaying when you preview the page in a browser. The CFGRID works on JAVA platform and if java is disabled, or the correct version is not there, it wouldn't show.
Are you able to see the grid and the data etc in the browser.
Inspiring
October 27, 2006
Haven't used cfgrid tag but you might want to try this:
Instead of <cfform>

use
<cfform method="post" action="aaa.cfm">

aaa.cfm is your file name
Inspiring
October 27, 2006
You also need to define the grid columns. When you preview your webpage, do you see an updateable grid with the code that you're using?
I'd say you need something like whats pasted below:
The URL for the code pasted below is
http://www.webworldinc.com/cfdocs/Developing_Web_Ap...Fusion/12_Building_Dynamic_Java_Forms/dwa12_08.htm
The cfgrid tag is explained in detail over there.

<HTML>
<HEAD>
<TITLE>Simple Update Grid Example</TITLE>
</HEAD>
<CFQUERY NAME="CourseList"
DATASOURCE="cfsnippets">
SELECT * FROM Courses
</CFQUERY>
<BODY BGCOLOR="#FFFFFF">
<CFFORM NAME="GridForm"
ACTION="handle_grid.cfm">
<CFGRID NAME="course_grid"
HEIGHT=170
WIDTH=400
HSPACE=10
VSPACE=6
ALIGN="RIGHT"
SELECTCOLOR="white"
SELECTMODE="edit"
ROWHEADERS="YES"
ROWHEADERWIDTH=25
ROWHEADERALIGN="right"
COLHEADERS="YES"
QUERY="CourseList"
GRIDDATAALIGN="left"
BGCOLOR="green"
INSERT="YES"
DELETE="YES"
SORT="YES"
MAXROWS=60>
http://www.webworldinc.com/cfdocs/Developing_Web_Ap...Fusion/12_Building_Dynamic_Java_Forms/dwa12_08.htm
(3 of 10)9/29/2006 1:39:20 AM
Creating an Updateable Grid
<CFGRIDCOLUMN NAME="course_id"
HEADER="Course ID"
WIDTH=80
ITALIC="NO"
HEADERALIGN="center"
HEADERITALIC="NO"
HEADERBOLD="YES"
DISPLAY="NO">
<CFGRIDCOLUMN NAME="number"
HEADER="Course ##"
WIDTH=80
ITALIC="NO"
HEADERALIGN="center"
HEADERITALIC="NO"
HEADERBOLD="YES"
DISPLAY="YES"
SELECT="YES">
<CFGRIDCOLUMN NAME="description"
HEADER="Description"
WIDTH=240
ITALIC="No"
HEADERALIGN="center"
HEADERITALIC="No"
HEADERBOLD="Yes"
BOLD="Yes"
ITALIC="Yes"
DISPLAY="Yes">
</CFGRID>
<INPUT TYPE="Submit" VALUE=" Push me... "> <BR>
</CFFORM>