Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Add Search or Filter to CFGrid

Posted on 2010-11-29
5
Medium Priority
?
928 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 2000 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

Technology Partners: 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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

971 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