Solved

Add Search or Filter to CFGrid

Posted on 2010-11-29
5
852 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

776 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