Thanks Robert,
It worked with your second suggestion but not with the first one. I am
wondering if there is a list of quirks somewhere for working with these
flash grids and binding?
Here's the code that worked for me:
<cfinput type="text" name="subcategory" label="Subcategory"
bind="{dollGrid.selectedItem.subcategory}"
onChange="dollGrid.dataProvider.editField(dollGrid.selectedIndex,
'SUBCATEGORY', subcategory.text);">
<cfinput type="submit" name="btn" value="submit">
Thanks,
Donna
----Original Message Follows----
From: "Robert Moss" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: Re: Need help with Flash Grid
Date: Wed, 29 Jun 2005 08:48:30 -0500
Try
bind="{dollGrid.dataProvider.getItemAt(dollGrid.selectedIndex)['SUBCATEGORYID']}"
Since SUBCATEGORYID is actually displayed in the data grid, you can also
use:
bind="{dollGrid.selectedItem.subcategoryID}"
I've attached a document that I've been playing with. I'm new to
actionscript, so I would not take anything I've done as the only, most
efficent, or best practice way. I've pretty much taken everything from
ASfusion.com
>>> [EMAIL PROTECTED] 6/28/2005 12:03 PM >>>
I've started experimenting with Flash Grids using CF7 and was trying to
duplicate the example code in the Getting Started code snippets. The code
below populates the grid but not the form when an item in the grid is
selected.
Any help would be appreciated.
<cfquery name="getDolls" datasource="dsn">
select *
from subcategories;
</cfquery>
<cfif isDefined("form.btn")>
<cfdump var="#form#">
</cfif>
<cfform format="flash">
<cfgrid name="dollGrid" query="getDolls" rowheaders="false">
<cfgridcolumn name="subcategoryID" header="ID">
<cfgridcolumn name="subcategory" header="Subcategory">
<cfgridcolumn name="description" display="false">
<cfgridcolumn name="categoryID" display="false">
</cfgrid>
<cfinput type="text" name="subcategoryID" label="ID"
bind="{dollGrid.dataProvider[dollGrid.selectedIndex]['SUBCATEGORYID']}"
onChange="dollGrid.dataProvider.editField(dollGrid.selectedIndex,
'SUBCATEGORYID', subcategoryID.text);">
<cfinput type="text" name="subcategory" label="Subcategory"
bind="{dollGrid.dataProvider[dollGrid.selectedIndex]['SUBCATEGORY']}"
onChange="dollGrid.dataProvider.editField(dollGrid.selectedIndex,
'SUBCATEGORY', subcategory.text);">
<cfinput type="submit" name="btn" value="submit" >
</cfform>
TIA,
Donna French
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm
<< people.cfm >>
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm