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 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

String Concatenation

I am working on exporting DataGrid content to CSV (I will present result soon) and one question came to my mind:

Is ActionScript 3 String concatenation efficient?

After some googling I have found Peter Farland blog post which suggested using String.fromCharCode() method instead of string concatenation. Although my case was a little bit different because I was to concatenate whole item labels (not single characters) I decided to create simple StringBuffer based on fromCharCode().

Continue reading String Concatenation

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
You can also view source of the example below.

Continue reading DataGrid with client-side filtering and searching

Scrollable Chart Axis Renderer

Some time ago I was asked to create column chart representing data in time with user friendly interface to change period of analysis. Current solution was consisted of two data fields to select date range and it was OK but it wasn’t really Flexy.

I decided to enable scrolling the chart by dragging the axis so that if one wants to see what’s beyond the left edge of chart (s)he can simply drag the charts horizontal axis and scroll it right. To enable zooming the data I chose to use mouse wheel. Generally these ideas was based on popular maps services interfaces.

This example is deprecated, consider using ChartScroller instead!!!
Continue reading Scrollable Chart Axis Renderer

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

Implementing Slide effects – iteration 3

This post is a continuation of iteration 2. From the end user point of view Slide effects presented here are almost identical to these from previous post. The only difference is that target components shadow or other filter drawn beside components bounds (0,0 to width, height rectangle) are not cropped during slide animation.

A number of changes was required to implement this functionality:

Continue reading Implementing Slide effects – iteration 3

Implementing Slide effects – iteration 2

This post is a continuation of Implementing SlideDown effect – iteration 1. It is quite short since extraction of Slide base class and implementation of SlideDown, SlideUp, SlideLeft and SlideRight classes was really straightforward. Most of the code from iteration 1 was used as base classes (Slide and SlideInstance). Concrete effect classes simply declares instanceClass in constructor while concrete effect instance classes overrides onTweenUpdate() method to tween animation in a specific direction.

Continue reading Implementing Slide effects – iteration 2

Implementing SlideDown effect – iteration 1

This tutorial describes how to create reusable effect which can be applied both by calling play() function and by binding it to showEffect/hideEffect MXML attribute.

If you simply want to use slide effect in your application you don’t have to read whole this tutorial. Simply download sources, open included examples and you will surely understand how to use it.

I have divided this tutorial into three parts (posts):

Continue reading Implementing SlideDown effect – iteration 1