Rendezvous with technology

Loads of new features in Flash Builder 4…

Posted by: Sameer on: June 6, 2009

The new Flash Builder 4 (formerly Flex Builder) is out in its Beta. It has loads of new features. Some of them are -
Developer Productivity – Event Handler generation, Getter/setter generation code indentation, file templates, etc..
Debugging – Contitional Breakpoint, Run to line, etc..
Working with data in a brand new way (Data Centric Development) – Connecting to HTTPService, WEBService, PHP, ColdFusion, BlazeDS, LCDS has been made so easy.
Flex Unit Support.
and many more….

Useful links -
Download – http://labs.adobe.com/technologies/flashbuilder4/
What’s new – http://www.adobe.com/devnet/flex/articles/flex4builder_whatsnew.html
List of Articles – http://sujitreddyg.wordpress.com/flash-builder-4/
Don’t forget to log the issues/enhancement you encounter in the bug-base here – http://bugs.adobe.com/flex

Go ahead, download it and give us feedback to make it better.

Consider a scenario in which you want to group some data and display it in an AdvancedDataGrid. Now, you open some nodes. And you want to add summaries to the data. Adding summaries means to re-group the data by calling GroupingCollection.refresh(). But the state of open nodes will be lost as new Objects are created for the group nodes while re-grouping.

I’m posting a sample in which the open nodes are preserved.

Sample here.

Source here.

Open the sample, click on Group data, open some nodes and then click on Add Summary. The nodes which are open will remain open.

Basically, here I’m giving the same UID for the group nodes as they were before (re-grouping). That’s why, the open state is maintained.

Note: This sample will work only if the grouping fields are same for both groupings. It’ll need some tweaking in case the grouping fields are changed.

Dynamically creating a column grouped AdvancedDataGrid

Posted by: Sameer on: April 25, 2008

Usually people like to write the AdvancedDataGrid component in mxml. But there are some scenarios where there is a need to create the grid dynamically.

Here is a simple sample in which an AdvancedDataGrid is created dynamically with column groups.

Source is posted here.

AdvancedDataGrid Performance Polls

Posted by: Sameer on: April 7, 2008

Hello Advanced DataGrid users,

We have added a poll about AdvancedDataGrid’s performance. Please take part in the poll and help us identify the areas which needs improvement.

The poll is hosted at flexpearls

Thanks again.

In this sample, I’m using an Advanced DataGrid as an item renderer within another Advanced DataGrid. This type of configuration is very useful to give a master-detail view. This configuration can be customized more depending on any specific requirements.

Sample here

Application Source, Renderer source

Thanks to Sreeni for coming up with this.

Extracting the source from an IHierarchicalCollectionView

Posted by: Sameer on: March 14, 2008

When you set Object/Collection as a source for an AdvancedDataGrid to display the source in a Hierarchical manner, the AdvancedDataGrid.dataProvider will return an instance of IHierarchicalCollectionView because internally the source is used to construct a HierarchicalCollectionView which is returned via the dataProvider property.

What if, you want the original source from this IHierarchicalCollectionView. Well, there are some API’s for achieving this -


// First, get the HierarchicalData used to create the HierarchicalCollection
var hd:IHierarchicalData = IHierarchicalCollectionView(adg.dataProvider).source;


//From the HierarchicalData, get the source collection/object
var source:Object = hd.getRoot();

Here is a sample.
Source here.

A 3-state checkbox in an AdvancedDataGrid ItemRenderer

Posted by: Sameer on: February 18, 2008

There is a post in Flex component Yahoo group on how to show a 3-state checkbox in an AdvancedDataGrid.

It has been implemented for the Flex Tree Control in the Flex cookbook.

I thought lets write a similar example for AdvancedDataGrid. I made some changes in the original sample and here it is; working for the AdvancedDataGrid control.

Example here

Source here

Showing Summary with the Group Node

Posted by: Sameer on: February 13, 2008

This example shows how AdvancedDataGrid can be configured to show summary with the Group node.

Here, I’m using GroupingCollection to calculate the Summary with summaryPlacement being “group”. Then using groupLabelFunction in AdvancedDataGrid and returning the Group Node’s value plus the Summary value.

Source mxml is located here.

Accessing Grouping.label in Summary Rows in AdvancedDataGrid

Posted by: Sameer on: December 6, 2007

The GroupLabel specified while creating a GroupingCollection can be accessed while displaying summaries in AdvancedDataGrid.

Although, accessing the GroupLabel in summary rows can be quite a tedious task but it can be very useful.

Here is a sample. In this sample, the Group name is displayed in the summary rows along with the value for the summary.

Source -

SQLite Manager in Firefox

Posted by: Sameer on: December 5, 2007

I was browsing the Add-ons in Firefox website and came across this useful Add-on – SQLite Manager

It can be use to manage any SQLite Database on the computer and provide features to manage tables, indexes, views and triggers.

As for now, it is looking good and full of features.

Go check it out.