Creating MDataGrid date filter

In this post I will describe how to create custom filter for MDataGrid (my extension of Flex 3 DataGrid described in one of the previous posts and hosted on http://code.google.com/p/reusable-fx/). I will guide you through creation of date filter as an example.

I consider extensibility one of the most important feature of well designed reusable component and that’s why I am trying to make process of creating new MDataGrid filters as straightforward as possible.

Continue reading Creating MDataGrid date filter

DataGrid with client-side filtering and searching

I am working on reusable Flex 3 DataGrid extension allowing client-side filtering and searching, and probably many other features in the future. Although it is not finished yet I decided to publish the result of my work to get some feedback from you:-)

The project source repository is located at http://code.google.com/p/reusable-fx/
You can also view source of the example below.

Continue reading DataGrid with client-side filtering and searching

Searchable DataGrid

Although standard Flex 3 DataGrid implements findString() function it is not really usable. Searching only the first column or the column with sorting enabled is definitely not intuitive and skipping to the next match on every keystroke is confusing. Furthermore calling to findString() changes selected index without highlighting matching text so in DataGrid with many columns it may be hard to figure out where the matching text is located.

Given above I decided to create new more flexible and reusable searching mechanism for DataGrid. As I was working on it I realized that other components (e.g. TextArea) may also support searching. That’s why I decided to create ISearchable interface to be implemented by every component supporting searching.

I also decided that searching should support standard wildcards like “*” or “?” so I created WlidcardUtils class to convert wildcards to regular expressions which are internally used by my searching mechanism. I know that regular expressions aren’t very fast so maybe one day I will write my own mechanism for matching wildcards but for now RegExp’s are enough.

Continue reading Searchable DataGrid