|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Bind to a CFINPUT from a CFGRID
I can't seem to figure out how to bind a selected column value in a CFGRID to a text box later on the page. Any ideas? ThanksChad Baloga 07/29/10 01:00 P gridExample.cfmRia Ragam 07/30/10 01:04 A As an aside:Michael Grant 08/04/10 07:44 P I can't seem to figure out how to bind a selected column value in a CFGRID to a text box later on the page. Any ideas? Thanks gridExample.cfm <cfquery name="GetParks" datasource="cfdocexamples" cachedwithin="#CreateTimeSpan(0, 6, 0, 0)#"> SELECT PARKNAME, REGION, STATE FROM Parks Where REGION = 'Southeast Region' ORDER BY ParkName, State </cfquery> <cfform name="GridForm" action=""> <cfgrid name="Brand_Grid" selectmode="row" selectonLoad="no" BindOnLoad="no" query="GetParks" format='html' appendKey ="yes" > <cfgridcolumn name="PARKNAME" header="PARKNAME" headeralign="center" headerbold="Yes"> <cfgridcolumn name="REGION" header="REGION" headeralign="center" headerbold="Yes"> </cfgrid> </cfform> <cfdiv id="id_DivEditeSiteDetail" bind="url:gridOutput.cfm?PARKNAME={GridForm:Brand_Grid.PARKNAME}"></cfdiv> gridOutput.cfm <h3>Echoing main page input:</h3> <cfoutput> <cfif isdefined("url.PARKNAME") AND url.PARKNAME NEQ ""> <cfoutput> <table> <tr> <td>Park Name:</td> <td><input value="#url.PARKNAME#" name="ParkName" type="Text"></td></tr> </table> </cfoutput> <cfelse> No input </cfif> </cfoutput> > I can't seem to figure out how to bind a selected column value in a > CFGRID to a text box later on the page. Any ideas? Thanks As an aside: I see this time and time again and just don't get it. If you're going to bother to test that url.Parkname exists and isn't a zero length string then why aren't you trimming it when you check? ----- Excess quoted text cut - see Original Post for more -----
|
September 05, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||