CFCs Returning Query with Bind from CFGrid
I have a cfgrid:
<cfgrid format="html" name="my_grid" query="pip_dealers" height="600" striperows="yes" width="80%" striperowcolor="DDF0FF" >
<cfgridcolumn name="dealer_id" display="no">
<cfgridcolumn name="pa_code" header="P&A Code">
<cfgridcolumn name="dealership_name" header="Dealer">
</cfgrid>
and I'm trying to display in a table on the same page different events associated with each dealer, and these events will show up when a dealer is clicked on. I'm trying to call a CFC and pass in the dealer_id, get a query back, then loop through the pertinent information with that query. I'm stumbling on how to bind things not in an input box, and I'm pretty sure I'm confused elsewhere as well.
My function:
<cffunction name="getStart" access="remote" returntype="query">
<cfargument name="dealer_id" type="numeric" required="yes">
<cfquery name="get_date" datasource="#app.dsn#">
SELECT event_begin_date
FROM events
WHERE dealer_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#dealer_id#">
AND event_begin_date is not null
</cfquery>
<cfset myResult = get_date>
<cfreturn myResult>
</cffunction>
How do I just call a CFC function? I don't think this is it:
<cfset x = pip_info.getStart({pip_grid.dealer_id})>
Thanks!
