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
Description: Binary data
