1 Reply Latest reply on Jul 23, 2013 6:01 AM by SarasotaTim

    Updating CFGRID Bind to CFINPUT textbox

    SarasotaTim

      Hey folks, I'm using a plain CFGRID (CF 8) to output a query resultset on the same page (in other words, not using a CFC or anything), for example:

       

         <cfgrid name = "SearchResultsGrid"

              height="250"

              query = "checklist_search"

              font="arial" fontsize="12" appendkey="yes" griddataalign="left" gridlines="yes" rowheaderalign="left" colheaderalign="center" selectmode="row" enabled="yes" visible="yes" format="html" autowidth="true" selectcolor="##578DCA">

              <cfgridcolumn name = "lname_busname1" header = "Last Name" headerbold="yes" headeralign="center" width="100">

              <cfgridcolumn name = "fname1" header = "First Name" headeralign="center" headerbold="yes" width="100">

              <cfgridcolumn name = "address" header = "Address" headerbold="yes" headeralign="center">

              <cfgridcolumn name = "trans_cat" header = "Category" headerbold="yes" headeralign="center" width="125">

              <cfgridcolumn name = "trans_subcat" header = "Transaction" headerbold="yes" headeralign="center" width="125">

              <cfgridcolumn name = "date" header = "Date" headerbold="yes" headeralign="center">

              <cfgridcolumn name = "id" header = "Checklist Number" headerbold="yes" headeralign="center" width="125">

              <cfgridcolumn name = "dob1" display="no">

              <cfgridcolumn name = "fname2" display="no">

              <cfgridcolumn name = "lname_busname2" display="no">

      </cfgrid>

       

       

      I'm then getting results (after the initial load) reflected in several textboxes:

       

      <tr>

      <td align="right"><span class="srch_title">First Name 1</span>:</td>

      <td><cfinput name="Data_FName1" type="text" class="inputs_nomargin" bind="{SearchResultsGrid.fname1}"></td>

      <td align="right"><span class="srch_title">Last/Business Name 1</span>:</td>

      <td><cfinput name="Data_LNameBus1" type="text" class="inputs_sm_nomargin" bind="{SearchResultsGrid.lname_busname1}"></td>

      </tr>

       

       

      My problem, of course, is that selecting different rows on the CFGRID doesn't update my group of textboxes, it only loads data from the first row of results.

       

      I see many examples doing this using CFC's, but.............how can I just have the textboxes update accordingly as I click down the rows of results when I have created my query on the same page the CFGRID and textboxes are?

       

      Thanks!!

       

      T