1 Reply Latest reply: Jan 14, 2014 1:28 AM by BKBK RSS

    Getting cfgrid (flash) to submit a row

    cekweb01 Community Member

      Hi all,

       

      I'm at about my wits end on this...I can submit a row from a query set in cfgrid if I set it to format=html and it works just fine.  However, with that format, I cannot sort columns which is necessary.  So, I set format=flash and the formatting works great, but I cannot submit a row for processing.  I've searched Google, Google Groups, Adobe, everyplace to no avail.  Plenty of "Working" solutions, but none work for me.  Below is the latest attempt:

       

      <cfform name="logForm">

           <cfgrid name="propOppGrid" height="500" selectmode="row" autowidth="true" format="flash" query = "session.allDefects" onchange="getUrl('cqStatus_s1.cfm?CFGRIDKEY='+propOppGrid.selectedItem.id, '_blank'); ">

       

      The query does indeed have a row called "ID" and it does display properly in the grid itself.  When I submit the form (which does indeed open up a new window ('_blank'), I get the following on my url and a blank page is displayed.

       

      "cqStatus_s1.cfm?CFGRIDKEY=undefined"

       

      If I put the ID into the url manually, the data on that page will display properly.  I've tried other query column names (checking for the possibility that ID is reserved) with the same results.

       

      VERY FRUSTRATED!!!!

       

      Any help is GREATLY appreciated.

        • 1. Re: Getting cfgrid (flash) to submit a row
          BKBK Community Member

          It works for me! I reproduced your scenario as follows.

           

          testForm.cfm

          <!--- The table animals has 2 columns (id, common_name) and 3 rows --->

          <cfquery name="session.allDefects" datasource="cfmx_db">

          select *

          from animals

          </cfquery>

           

          <cfform name="logForm">

               <cfgrid name="propOppGrid" height="500" selectmode="row" autowidth="true" format="flash" query = "session.allDefects" onchange="getUrl('cqStatus_s1.cfm?CFGRIDKEY='+propOppGrid.selectedItem.id, '_blank');" />   

          </cfform>

           

          cqStatus_s1.cfm

          <cfdump var="#url#">

          Query string: <cfdump var="#CGI.QUERY_STRING#">

           

          The grid displays as expected. When I click on a row, the page cqStatus_s1.cfm pops up, displaying the id corresponding to the row. You might like to know that I am on ColdFusion 10.0.13.287689.