Skip to main content
April 17, 2008
Answered

CFGRID Filter

  • April 17, 2008
  • 1 reply
  • 765 views
Hi,

I have a CFGRID that uses a cfc to bind the data to the grid. So far so good. I also have an onchange function that allows you to update the grid. I've worked up a filter in a cfselect, with a bind coming from the cfc - function is getBrandsFilter.

I'm trying to get the cfselect and the cfgrid to interact, such that when a filter is picked, the grid responds.

Attached is the base page and the cfc:

Any thoughts on how to make this work would be greatly appreciated!

cfwild
This topic has been closed for replies.
Correct answer
Hi Azadi,

Your response worked out perfectly. I'll post my changes, just in case anyone else reads this post.

Thanks again!

cfwild

1 reply

Inspiring
April 17, 2008
update your cfgrid's bind attribute to:

bind="cfc:brands2.getBrands({cfgridpage}, {cfgridpagesize},
{cfgridsortcolumn}, {cfgridsortdirection}, {getBrandsFilter@change})

update your getBrands method of brands2 cfc to accommodate the above
change (i.e. query should have a where clause limiting the results to
selected brand id)

try that see how it goes - this is totally from memory, so may not be
100% accurate...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Correct answer
April 17, 2008
Hi Azadi,

Your response worked out perfectly. I'll post my changes, just in case anyone else reads this post.

Thanks again!

cfwild