I am working on some code that previously was using a cfquery, and is now using bind to a cfc to get the data. When it was using the query, the column 'workcomplete' showed yes/no (These are the values saved in the database as text). Now that it is using bind, that column is showing true/false instead of yes/no. They match, ie, if the database has 'No', the cfgrid shows 'False' and 'Yes' comes up as 'True'. Is there some setting that can be changed so that it will use the actual values from the database again?
From the cfml:
<cfform>
<cfgrid format="html" name="list" striperows="yes" fontsize="12" pagesize="25" selectmode="row" bind="cfc:joborder.getJoborders({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="dispatchnum" header="Dispatch Num" href="job.cfml" hrefkey="jobid" width="100"/>
<cfgridcolumn name="submitdate" header="Submit Date" width="90">
<cfgridcolumn name="jobname" header="Job Name" width="200" >
<cfgridcolumn name="contactlast" header="Contact Last Name" width="150" >
<cfgridcolumn name="workcomplete" header="Completed" width="100" >
<cfgridcolumn name="jobid" header="Edit " href="jobedit.cfml" hrefkey="jobid" width="40" />
<cfgridcolumn name="editdate" header="Edit Date" width="80"/>
<cfgridcolumn name="jobid" header="DELETE" hrefkey="jobid" width="60" href="delete.cfml?jobid=url.jobid">
</cfgrid>
</cfform>
From the cfc:
<cffunction name="getJoborders" access="remote">
<cfargument name="page" required="yes">
<cfargument name="pageSize" required="yes">
<cfargument name="gridsortcolumn" required="yes">
<cfargument name="gridsortdirection" required="yes">
<cfif arguments.gridsortcolumn eq "">
<cfset arguments.gridsortcolumn = "dispatchnum" />
<cfset arguments.gridsortdirection = "desc" />
</cfif>
<cfquery datasource="jobs" name="joborders">
SELECT DISPATCHNUM, SUBMITDATE, WORKCOMPLETE, EDITDATE, JOBID, ORDERNUM, JOBNAME, CONTACTFIRST, CONTACTLAST
FROM JOBORDERS
<cfif gridsortcolumn neq ''>
order by #arguments.gridsortcolumn# #arguments.gridsortdirection#
</cfif>
Thanks!