Searchable Grid Widget
June 30, 2006 14 Comments
This is a small script which creates a searchable grid. This script is too basic and is for newbies (like myself 🙂 ). Check out the demo and source here. This scriptlet should give an idea about –
- Creating the SearchGrid custom control.
- Using the SearchGrid control.
In this script, we have two ArrayCollections. One for the column details and another for the data. This way, we are abstracting the columns info and data from the custom widget. The widget is basically a datagrid with a textfield on top. When the user types into the textfield, the grid filters to data which contain the typed text.
To try out the demo, try typing in words from the data in the grid andyou will find the grid filtering. The search logic in this script is from the ThoughtFactory MXNA Viewer. The MXNA viewer has many more features. All I have done here is pull out the logic for the search, modify it a little bit and create a widget that can be reused. Enjoy!
*Special thnx to Ajit for helping me optimize the code.
The Latest version of Search Grid is here .