Link to home
Start Free TrialLog in
Avatar of myerit
myerit

asked on

Use CFGrid selectedItem as a form value

Can the selectedItem variable be refrenced in a form submission?  I am not sure if I am asking that right so here is an example:

OK, I have this grid in a form-->

<cfform action="anotherpage.cfm">
     <cfgrid name="Grid" query="Grid">
          <cfgridcolumn name="ColumnOne" header="Column One">
     </cfgrid>
</cfform>

Can it be refrenced in the submission of that form if a value is highlighted in that grid?

Example:
<cfquery datasource="Table">
     INSERT INTO tableOne (GridItemNumber)
     VALUES ('#Form.Grid.selectedItem.ColumnOne#')
</cfquery>

Again i am not sure if I am making sense to anyone.
ASKER CERTIFIED SOLUTION
Avatar of 8riaN
8riaN

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of myerit
myerit

ASKER

You are a genius!

Thanks much, that is exactly what I needed!