Dave Cahall
Vice President, Professional Services
Digitaris Technologies,
Inc.
Office:
972.690.4131 ext 116
Mobil:
214.914.9947
-----Original Message-----
From: Susan N. Klos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 4:09 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnDave, I figured it out. It was in help, but when I looked at it the first time, I didn't understand it. If anyone is interested the action page looks like this:<CFIF IsDefined("form.Meetingsgrid.rowstatus.action")><cfloop INDEX = "Counter" FROM = "1" TO = #ArrayLen(form.meetingsgrid.rowstatus.action)#><CFIF form.meetingsgrid.rowstatus.action[Counter] IS "D">
<CFQUERY NAME="DeleteExistingMeeting"
DATASOURCE="#Application.db#">
DELETE FROM tblmeetingdates
WHERE
MeetingID=#form.meetingsgrid.original.MeetingID[Counter]#
</CFQUERY>
<CFELSEIF form.meetingsgrid.rowstatus.action[Counter] IS "U"><CFQUERY NAME="UpdateExistingMeeting"
DATASOURCE="#Application.db#">
UPDATE tblmeetingdates
SET
MeetingNo='#form.meetingsgrid.MeetingNo[Counter]#',
MeetingDAte=#form.meetingsgrid.MeetingDate[Counter]#
WHERE
MeetingID=#form.meetingsgrid.original.MeetingID[Counter]#
</CFQUERY><CFELSEIF form.meetingsgrid.rowstatus.action[Counter] IS "I"><CFQUERY NAME="InsertNewMeeting"
DATASOURCE="#Application.db#">
INSERT into tblmeetingdates
(DistrictID, MeetingNo, MeetingDate)
VALUES ('#session.districtID#',
'#form.Meetingsgrid.meetingno[Counter]#',
#form.Meetingsgrid.meetingdate[Counter]#)
</CFQUERY></CFIF>
</cfloop>
</CFIF>-----Original Message-----
From: Dave Cahall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 3:41 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnI have looked at several options and none of them are "clean". CFGRID and the CFGRIDUPDATE tags are not very intelligent and robust. I was not able to set a dynamic value for a column on an insert. I then played around with adding a hidden form field but CFGRIDUPDATE will not recognize the hidden form field (although it got passed to the action page). I would suggest that you eithr use a standard form page or "roll your own code" for the action page. Neither of these are as easy as the cfgrid but they are about all you can do. I even tried messign with some of the expanded capabilities in CF 5, but they did not produce the desired results either.Dave Cahall
Vice President, Professional Services
Digitaris Technologies, Inc.
Office: 972.690.4131 ext 116
Mobil: 214.914.9947-----Original Message-----
From: Susan N. Klos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 11:43 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnYes, the table has a column called DistrictID-----Original Message-----
From: Dave Cahall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 11:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnI hate to ask this, but does the database contain a column named DistrictID. Since you are using the CFGRIDUPDATE tag, the column names in your CFGRIDCOLUMN tags MUST match a database column name EXACTLY. This is one of the pitfalls of using the short cut method.Dave Cahall
Vice President, Professional Services
Digitaris Technologies, Inc.
Office: 972.690.4131 ext 116
Mobil: 214.914.9947-----Original Message-----
From: Susan N. Klos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 10:30 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnI made the column visible and when I add a row (I have cfgrid set to Insert="yes") DistrictID does not show up. But I know the variable exists because I can output it elsewhere on the page
-----Original Message-----
From: Dave Cahall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 11:18 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnAre you sure the session variable is set? Make the value visible to make sure it is there!Dave Cahall
Vice President, Professional Services
Digitaris Technologies, Inc.
Office: 972.690.4131 ext 116
Mobil: 214.914.9947-----Original Message-----
From: Susan N. Klos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 10:17 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnI get no error message but the data that goes into the database does not include the DistrictID. Everything else goes in-----Original Message-----
From: Dave Cahall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 11:03 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnWhat happens when you "submit" your grid?Dave Cahall
Vice President, Professional Services
Digitaris Technologies, Inc.
Office: 972.690.4131 ext 116
Mobil: 214.914.9947-----Original Message-----
From: Susan N. Klos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 10:04 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnDave, on this issue. I tried to put a value in the cfgridcolumn but it didn't get into the database. Here is the code. Did I do something wrong?<cfgridcolumn value="#session.districtID#" name="DistrictID" display="no">Do I have to do something to the cfgridupdate or maybe I can't even use that in the action page?-----Original Message-----
From: Dave Cahall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 9:29 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Put a value into a cfgrid columnValues are placed in CFGRIDCOLUMN tags or CFGRIDROW tags. CFGRIDCOLUMN has a Value attribute and CDGRIDROW has a Data attritube. That is where you insert values.Dave Cahall
Vice President, Professional Services
Digitaris Technologies, Inc.
Office: 972.690.4131 ext 116
Mobil: 214.914.9947-----Original Message-----
From: Susan N. Klos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 8:28 AM
To: DFWCFUG (E-mail)
Subject: Put a value into a cfgrid columnI have a cfgrid for a table. I would like to have a column that automatically displays a session variable. I could not find a default or value attribute for the column. Is there one?
