View Full Version : cfgrid

12-16-2010, 07:04 PM

Not sure what to do or how to do it. Placed cfgrid on page with Select Query to get data from records with date parameter of yesterday and today. The grid populates OK using query attribute. What I want to do is be able to have user select row and then auto populate info into text boxes stationed below the grid.
Should the attribute I use be bind rather than query? Where can I get syntax/coding info on the bind attribute for cfgrid?


12-22-2010, 06:52 PM
Figured it out. Did the following and it works fine:

<cfgrid name="reqInfo" query="Req" width="950" visible="yes" format="html" rowheaders="yes" rowheaderwidth="50" selectcolor="orange" selectmode="row" colheaderbold="yes" colheadertextcolor="Blue" >
<cfgridcolumn name="ID" display="no" />
<cfgridcolumn name="PIN" display="no" />
<cfgridcolumn name="Name" header="Name" headerfontsize="14px" width="150" />
<cfgridcolumn name="RequestDate" header="Request Date" headerfontsize="14px" width="115" />
<cfgridcolumn name="BeginDate" header="Begin Date" headerfontsize="14px" width="90" />
<cfgridcolumn name="EndDate" header="End Date" headerfontsize="14px" width="90" />
<cfgridcolumn name="TypeofHours" header="Type of Hrs" headerfontsize="14px" width="100" />
<cfgridcolumn name="NumberHrsRequested" header="Hrs Req" headerfontsize="14px" width="80" />
<cfgridcolumn name="Project" display="no" />
<cfgridcolumn name="Justification" display="no" />
<cfgridcolumn name="RCbeginDate" type="date" header="RC Begin" headerfontsize="14px" width="80" />
<cfgridcolumn name="RCendDate" type="date" header="RC End" headerfontsize="14px" width="80" />
<cfgridcolumn name="RCLeaveSlip" header="Leave Slip" headerfontsize="14px" width="90" />
<cfgridcolumn name="Decision" header="Decision" headerfontsize="14px" width="80" />
<cfgridcolumn name="ReasonForDenial" display="no" />
<br />

<table width="600" cols="2" id="ProjInfo" border="0" cellpadding="0">
<td width="300" ><strong><u>Project(s)</u></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td width="300" ><strong><u>Justification for Request</u></strong><font color="#0000FF" /></td>
<cftextarea name="Project" bind="{reqInfo.Project}" cols="30" rows="5"/>

<cftextarea name="Justification" bind="{reqInfo.Justification}" cols="30" rows="5"/>
<br />
<table width="600" cols="3" id="RCInfo" border="0" cellpadding="0">
<td colspan="3" align="center" valign="middle" height="50"><strong><u>Rationale for Request Denial</u></strong></td>
<td colspan="3" align="center"> <cftextarea name="DenialInfo" bind="{reqInfo.ReasonForDenial}" cols="50" rows="5" /> </td>
<br /><br />
<cfinput type="button" name="decApprvd" value="Request Approved">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<cfinput type="button" name="decDenied" value="Request Denied">