• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfgrid in Cf7

New Here ,
Dec 14, 2012 Dec 14, 2012

Copy link to clipboard

Copied

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>

TOPICS
Advanced techniques

Views

632

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2012 Dec 15, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 17, 2012 Dec 17, 2012

Copy link to clipboard

Copied

LATEST

<cfgrid format="xml"

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

thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation