Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Updating CFGRID Bind to CFINPUT textbox

New Here ,
Jul 22, 2013 Jul 22, 2013

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

781
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 23, 2013 Jul 23, 2013
LATEST

Nevermind guys, got it....it does this automatically (auto updating fields binded to grid when clicking different rows) if you DON'T  have duplicate cfgridcolumn entries...ughhh, idiotic on my part, all apologies.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources