Skip to main content
Known Participant
December 14, 2012
Question

cfgrid in Cf7

  • December 14, 2012
  • 1 reply
  • 725 views

Hi,

I have the search page for user to search the purNO and display resutls in the list.  I am tring to do the paging but keep got an error for cf 7 not supported the PAGESIZE,BIND.  Please advice with the code below to have it works in colfusion 7.

Thanks


<!---form--->
<cfparam name="variables.row_per_page_default" default="15">

<cfform name="tableform">
<cfgrid format="html"
name="grid_Tables"
pagesize="#variables.row_per_page_default#"
selectmode="row"
bind="cfc:cfc.query.pur{purNO},{cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="purNO" display="Purchase No"/>
<cfgridcolumn name="date_modified" header="Date Modified" >
</cfgrid>
</cfform>

<!---cfc--->
<cffunction name="purNo" returntype="query" access="public">
<cfargument name="purNO" required="yes" type="numeric" />
<cfargument name="page" required="yes">
<cfargument name="pageSize" required="yes">
<cfargument name="gridsortcolumn" required="yes">
<cfargument name="gridsortdirection" required="yes">

<cfquery name="qPur" datasource="#variables.dsn#">
     SELECT *
    FROM tbl_pur
    WHERE purNO = <cfqueryparam  value="#arguments.purNO#" cfsqltype="cf_sql_integer" />
    </cfquery>
   
<cfreturn queryconvertforgrid(qPur, page, pagesize) />
</cffunction>

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
December 15, 2012

Sorry. I do not expect the code to work in Coldfusion MX7. Support for the bind attribute in HTML forms, in particular binding to CFCs, only began with ColdFusion 8.

newcfAuthor
Known Participant
December 17, 2012

<cfgrid format="xml"

what's about xml format?, grid is worked but is there the way you can have  pagination?

thanks