I have not used CF grid since 61 (java version). It was a bit dodgey back
then, I could not get it to update with a client on a Mac.

If you are on CF 8 check this out:
http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/

Ben Forta has a tute on his blog on using cfgrid to do crud on the fly.

hth,
G



On Mon, Mar 24, 2008 at 8:02 AM, Ali <[EMAIL PROTECTED]> wrote:

> Hi:
> I made a grid with cfgrid then I made an action page with cfgridupdate. It
> works when I change one cell but doesn't work when I change more than one
> cell! Here is the code:
>
> The page that contains grid : cfgridtets.cfm
> <!--- the start of the first page --->
> <cfquery name="UsersGrid" datasource="#Request.DSN#">
> SELECT UserID, UserName, UserPassword, FistName, LastName, City,
> UserActive
> FROM Tbl_Users</cfquery>
>
> <cfquery name="rstest" datasource="#Request.DSN#">
> SELECT *
> FROM Tbl_City
> </cfquery>
>
> <html >
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <title>Grid Page</title>
> </head>
>
> <body>
>
> <cfform   action="../cfgridtestaction.cfm"
>  method="Post"
>  name="GridForm">
>
>  <cfgrid name="MYGRID"
>  format="html"
>  insert="yes"
>  query="UsersGrid"
>  COLHEADERBOLD="Yes"
>  COLHEADERFONT="Tahoma"
>  SELECTMODE="EDIT"
>  width="400"
>  height="200"
>  DELETE="Yes"
>  DELETEBUTTON="Del?">
> <cfgridcolumn name="UserID"
>  display="No">
> <cfgridcolumn SELECT="Yes"
>  name="UserName"
>  header="User Name">
> <cfgridcolumn SELECT="Yes"
>  name="UserPassword"
>  header="User Password">
> <cfgridcolumn name="FistName"
>  select="Yes"
>  header="Fist Name"
>  headerAlign="RIGHT">
>
> <!--- here I use another query to make a combo box to list city names --->
> <cfgridcolumn name="City"
>     values="#ValueList(rstest.CityName)#"
>  select="Yes"
>  header="City"
>  headerAlign="RIGHT">
>
> <cfgridcolumn name="UserActive"
>
>  select="Yes"
>  header="User Active"
>  headerAlign="RIGHT">
> </cfgrid>
>
>
> <P><input type="Submit" value="Save">
> </cfform>
>
> </body>
> </html>
> <!--- end of the first page --->
>
>
> This is the page I use as an action page to cfgridupdate works:
> cfgridtestaction.cfm
>
>
> <!--- start of the page two --->
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>Action Page</title>
> </head>
>
> <body>
> <!--- here is the cfgridupdate page... but when I change more than one
> cell
> in the grid it doesn't work --->
>  <cfgridupdate datasource="#Request.DSN#"
>  tableName="Tbl_Users"
>  grid="MYGRID">
> </body>
> </html>
> <!--- end of the second page--->
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301898
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to