Thursday 24 Jul 2008   
Add Comment

Dynamic Client Side Filter Tutorial

ColdFusion Tutorial #7

In this sample, a DataGrid is populated and a textbox allows entry of data. As the data is typed the DataGrid is dynamically filtered by eliminating rows that don't match the filter. It automatically searches all columns defined in the grid.

FlexSearch.mxml

When a user types in a key word the search splits the words by a space delimiter and matches letter by letter, filtering each row from the arrayCollection narrowing down the results.

 
 


Book.cfc

The cfc queries the database retrieving the dataset which is passed to flex. The resulting dataset is bound to the data grid. I take a copy of the data so I am able to use the existing data without going back to ColdFusion. While remote objects are quick it’s not as quick as client side and if I can do it with flex well why not.

 
 


Demo

See this code running!


Download

Download this code as a zip!


Comments

There are no comments!

Click button to add a comment


Author

Paul Kukiel


Published

Thursday 17 Apr 2008

Tags

cfcomponent  cffunction  cfquery  cfreturn  cfset  mx:Application  mx:DataGrid  mx:FormItem  mx:method  mx:RemoteObject  mx:Script  mx:TextInput