Solved

Add Search or Filter to CFGrid

Posted on 2010-11-29
5
873 Views
Last Modified: 2012-06-21
I attached my Grid below.  Its pretty simple one.  I would like to add a search to it. Anyone have any experience doing this please help me out.

I attached my Grid below.
<cfform name="CouponForm">
<cfgrid name="parkGrid" selectmode="row" format="HTML" pagesize="8" width="585" bind="cfc:listCoups.getParks({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
                <cfgridcolumn name="Cid" header="id" display="no">
                <cfgridcolumn name="businessName" width="185" header="Business Name" href="detailcoupon.cfm" hrefkey="id"/>
                <cfgridcolumn name="cDescription" width="200" header="Coupon" />
                <cfgridcolumn name="city" width="80" header="City" />
                <cfgridcolumn name="NEWexpDate" width="200" header="Exp Date" />
              </cfgrid>
            </cfform>

Open in new window

0
Comment
Question by:sonicimpulse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:RickEpnet
ID: 34236404
Hmmm you can do this through a CFC. I am sure agx will help you.
0
 
LVL 14

Accepted Solution

by:
RickEpnet earned 500 total points
ID: 34236518
Add a cfinput to the HTML page

<cfinput type="text" name="searchfield">

In your CFC function add this to the top of the arguments.

<cfargument name="searchfield" required="yes">

Add a "where" statement to the query or add the searchfield to the "where" statement.


bind="cfc:listCoups.getParks({searchfield@keyup},{cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"

Open in new window

0
 

Author Comment

by:sonicimpulse
ID: 34244735
I get the following error:

You cannot specify more arguments to a CFC function than it declares.  
Error parsing bind cfc:listCoups.getParks({searchfield@keyup},{cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})  
0
 
LVL 14

Expert Comment

by:RickEpnet
ID: 34245131
Did you add this to above all you cfc arguments in that cfc function?

<cfargument name="searchfield" required="yes">

Where do you get the error when you start typing in the search box?
0
 

Author Closing Comment

by:sonicimpulse
ID: 34245201
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question