cfgrid / cfc

Discussion in 'Programming' started by Paul_Hopkinson, Oct 17, 2007.

  1. #1
    trying to get this code below working but I get an "Exception thrown and not caught " issue and no data is returned to the cfgrid.
    The cfc is called and runs fine as adding cfdebug onto the url shows me the data

    Code below
    <cfform format="html" name="ResellersList" width="600">

    <cfgrid name="grid_Tables" format="html" pagesize="5" selectmode="row"
    bind="cfc:cfc.Resellers.GetResellerList({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">

    <cfgridcolumn name="str_FirstName" header="First Name">
    <cfgridcolumn name="str_LastName" header="Last name">
    <cfgridcolumn name="str_Username" header="User name">
    <cfgridcolumn name="str_emailAddress" header="Email" >
    </cfgrid>

    </cfform>


    the cfc


    <cffunction name = "GetResellerList"
    access = "remote">

    <cfargument name="page" required="yes">
    <cfargument name="pageSize" required="yes">
    <cfargument name="gridsortcolumn" required="yes">
    <cfargument name="gridsortdirection" required="yes">

    <cfquery datasource="#Request.superdsn#" name="GetResellerListData">
    SELECT *
    FROM tbl_Resellers
    <cfif gridsortcolumn NEQ ''>
    ORDER BY #gridsortcolumn# #gridsortdirection#
    </cfif>
    </cfquery>

    <cfreturn GetResellerListData>

    </cffunction>
     
    Paul_Hopkinson, Oct 17, 2007 IP