Coldfusion 8 html cfgrid not paging

I have a cfgrid in html and cant seem to ge tit to page, any ideas?


<cfform>
<cfgrid format="html" name="grid_Tables" pagesize="10" selectmode="row">
 
 
<CFGRIDCOLUMN NAME="FirstName" HEADER="First Name" HEADERALIGN="left" DATAALIGN="left" BOLD="no" ITALIC="no" SELECT="no" DISPLAY="yes" HEADERBOLD="no" HEADERITALIC="no">
<CFGRIDCOLUMN NAME="LastName" HEADER="Last Name" HEADERALIGN="left" DATAALIGN="left" BOLD="no" ITALIC="no" SELECT="no" DISPLAY="yes" HEADERBOLD="no" HEADERITALIC="no">
<CFGRIDCOLUMN NAME="State" HEADER="State" HEADERALIGN="left" DATAALIGN="left" BOLD="no" ITALIC="no" SELECT="no" DISPLAY="yes" HEADERBOLD="no" HEADERITALIC="no">
<CFGRIDCOLUMN NAME="Email" HEADER="Email" HEADERALIGN="left" DATAALIGN="left" BOLD="no" ITALIC="no" SELECT="no" DISPLAY="yes" HEADERBOLD="no" HEADERITALIC="no">
<cfoutput QUERY="GetData">
<CFGRIDROW DATA="#FirstName#,#LastName#,#State#,<a href=""Mailto:#Email#"">Send Email</a>">
</cfoutput>
</cfgrid>
</cfform>

Open in new window

LVL 2
Matt GrofskyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott BennettManager TechnologyCommented:
If you want it to paginate you need to do it "AJAX style" by binding it to a CFC like this:


Contacts.cfc
========================
<cffunction name="getData" access="remote">
<cfargument name="page" required="yes">
<cfargument name="pageSize" required="yes">
<cfargument name="gridsortcolumn" required="yes">
<cfargument name="gridsortdirection" required="yes">
 
<cfquery name="GetData" datasource="MyDSN">
SELECT FirstName,LastName,State,Email
FROM ContactsTable
</cfquery>
 
<cfloop from="1" to="#GetData.RecordCount#" index="i">
	<cfset querysetcell(GetData,"Email","<a href=""mailto:#GetData.Email[i]#"">Send Email</a>",i)>
</cfloop>
 
<cfreturn queryconvertforgrid(GetData,page,pagesize)/>
</cffunction>
 
 
GridPage.cfm
==============================
<cfform>
<cfgrid format="html" name="grid_Tables" striperows="yes" pagesize="10" selectmode="row" bind="cfc:Contacts.getData({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
	<cfgridcolumn name="FirstName" header="First Name" select="No">
	<cfgridcolumn name="LastName" header="Last Name" select="No">
	<cfgridcolumn name="State" header="State" select="No">
	<cfgridcolumn name="Email" header="Email" select="No">
</cfgrid>
</cfform>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SidFishesCommented:
afaik there is no built in pagination for cfgrid... you can do it though using bind and a cfc

check out

http://www.garyrgilbert.com/tutorials/coldfusion/intermediate/cfgrid.cfm
and
http://www.andyscott.id.au/index.cfm/2007/8/5/Coldfusion-8-and-cfgrid-pagination
0
Matt GrofskyAuthor Commented:
Well that definitely got paging to show up.

But for some reason the table is not getting populated with any data.  I went and found an example by Ben forta also that did the same and ran the code and get the same error.

window:global: Exception thrown and not caught

There are no errors when I run the CFC through Invoke as well as hitting it with a URL.
0
Matt GrofskyAuthor Commented:
Actually that was my error your sample did indeed work, thanks.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.