Solved

Add Search or Filter to CFGrid

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
drop down navigation on mobile devices adds spaces 3 77
Web Reply Form - PHP with Upload 4 55
Standard for Web Development 3 27
REReplaceNoCase help 1 16
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…
The viewer will learn how to count occurrences of each item in an array.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now