Groups | Blog | Home
all groups > coldfusion flash integration > april 2005 >

coldfusion flash integration : CFGRID with bind to text field --- IS IT ME????!


tags26
4/5/2005 8:52:54 PM
Ok...I'll keep it simple. I cannot get the binding feature to work in CF with
cfgrid and cfform together. I am taking the example from the "getting started"
"code snippets" entitled Flash Grid on Macromedia's homepage. Everything is
working fine when I comment out the bind section. For example, I can view
flash forms and grids with no problem. But when I put the bind code in the
page doesn't load. I do not get an error, i have flash error scripting on as
well. The page loads blank. If i comment out the bind section, the page loads
with the grid and text area field...but with no binding obviously. Help. I
kept it real simple using only one field from a table...the code is
below..maybe nimer or someone else can tell me what the hell i'm doing wrong.



<cfquery name="getusers" datasource="provisions">
select username
From Users
</cfquery>

<cfif isDefined("form.btn")>
<cfdump var="#form#">
</cfif>

<cfform format="flash">

<cfgrid name="artistGrid" query="getusers" rowheaders="false">
<cfgridcolumn name="UserName" header="User Name">

</cfgrid>

<cfinput type="text" name="Username" label="Username"
bind="{artistGrid.dataProvider[artistGrid.selectedIndex]['USERNAME']}"
onChange="artistGrid.dataProvider.editField(artistGrid.selectedIndex,
'USERNAME', username.text);">

<cfinput type="submit" name="btn" value="submit" >


</cfform>
MeredithJones
4/21/2005 12:00:00 AM
I'm still pretty new to CF7 myself but your bind statement looks wrong to me.
Try something like this

bind="{RoomList.selectedItem.ROOML_NOTES}"

RoomList is the Grid and ROOML_NOTES the grid column

best of luck
mrock613
4/21/2005 12:29:50 PM
Change all instances of username in your binding statement to UserName.
AddThis Social Bookmark Button