June 16, 2008

Remove sort icon on the header of AdvancedDataGrid

Filed under: Extensions — venomeffect @ 9:17 am

Venom Ponders :

I am wondering how UI programming can have so many use cases which I never felt when I was working on Solaris long back . Nah! Too much indigestion .

The undo feature in ADG header for the sorting has been pretty sought after for a while now . As a matter of fact, undo feature in everything is a good practice. So I thought I will just build it voila here it is ! I have extended it from a previous renderer I built from scratch modelled on the AdvancedDataGrid cos it had a few things I would want to be assigned a protected modifier rather than a private modifier .

The approach :

Nothing much to write here . Put an image and spliced out the elements from the sort.fields of the grid instance based on the listData. Thats it and good to go . But yeah ! placement needs to be managed .

Take it!!

You can check out the app here

You can grab the source from here .

Screenshot :

May 30, 2008

HOWTO: Set different group heights for different rows and depths in Advanced DataGrid

Filed under: HOWTO — venomeffect @ 1:38 pm

It’s been a long time since I wrote anything . Promise to be more regular. You heard that right. It is a promise.

So venom is back and this is what he is pondering for now :

Sometimes it is so obvious that you wonder why we dint put somethings into the component which you would assume to be there for granted . What can we say , the use and popularity of the component outgrows its features at times. One such use case which many users have encountered but not been able to get around to is the limitation of custom row heights at different levels of a group when the data provider of tree type is set to the Advanced Data Grid.

This is a very common need especially in financial analysis and when heavy use of item renderers is used for representing the data in a more methodical manner. In fact , a little bit of tweaking to the AdvancedDataGrid component has enabled me to meet this need. Probably you can add on to it whatever you might feel fit to meet your needs.

The two use cases:

I believe the need to set different row heights at different levels of a tree display can be two fold : one being that I would like every row at one particular depth to have a particular height with everything else being the same and the other being that I would want different rows to have different heights to avoid a lot of layout fiasco .

TheĀ  approach :

There are two additions to the code here here :

  • Property by the name depthForCustomHeight to which the depth needs to be set . When this value is set ( default being -1) , then this will take the groupRowheight value and set it only to the corresponding depth mentioned.
  • A depth array can be passed to the component which will specify which height needs to be set to which depth. This array should be an array of objects with each object being of the signature :


This array will specify the height mentioned in the object to depth mentioned. Note that the depthArray is overridden when the depthForCustomHeight variable is set ( as it should be ) and the latter takes precedence over the former. So , under all circumstances before specifying depthArray, we have to ensure that depthForCustomHeight is of default value -1 .

Enough with the gyaan now. You can check out the app here :

Here are some screenshots of the feature :

When the depthForCustomHeight variable is set to a depth

Depth for custom height

When the depthArray is mentioned :

Depth Array

You can grab the source of the application here . The source for quiet a few of my personal initiatives in Flex are also there for peruse. The component name is VenomGroupRowHeightGrid and the MXML is VariableGroupRowHeight.mxml .It has a few dependencies , so keep the whole lot and run like hell.

April 3, 2008

Adobe RIA Architect Summit ’08 : Ben Forta in charge

Filed under: Generic Flex — venomeffect @ 12:10 pm

The summit kicked off to a great start with Naresh Gupta(MD, Adobe India) giving insight into the exciting things to come followed by an eye opener by David Wadhwani ( VP and GM,Platform BU, Adobe ).

And then Ben Forta took over . Ben had the entire room raptured with awe and admiration at the technology . He demonstrated back end integration with the Flex applications, styling and skinning of the UI components and conflict management of the back end server all within insanely few lines of code. I have never seen some one present the power of Flex in such a unique style of presentation.

Go Flex and AIR . More to follow . This has been nothing but just the tip of ice berg.

Adobe RIA Architect Summit 2008 kicks off : Ushering in the artist

Filed under: Generic Flex,Uncategorized — venomeffect @ 7:39 am

Venom ponders : It is not always silence before storm. Sometimes there is heavy traffic .

9 AM . Bangalore. Busy day. People rushing in and around. Heavy traffic. It is Thursday and two days away from the glorious weekends we all wait impatiently wait for .

Typical Thursday, right ? Wrong..

The history of internet interactivity is being rewritten here at the Chancery Pavilion , Bangalore.

Ladies and gentlemen. Presenting the Adobe RIA Architect Summit ’08 , Bangalore.

The summit aims at bringing to light the next generation components and controls that define the layout of web and desktop applications of tomorrow, converging the design and creativity of a host of designer tools like the Adobe Flash, Dreamweaver,Fireworks etc. with optimized flex code thus bridging the designer-developer canyon, displaying mind blowing transition effects that zoom in and glide through the desktop and web, building business logic that don’t look drab anymore, architecting major applications using the highly recommended MVC architecture, changing the way you will look at video and images on the web .. ever., inviting the entire civilization of the interaction, innovation and animation of the web to your very own desktop ………. the list goes on .

Two words to sum it up : AIR and FLEX

What does it make you ? An artist

So spread the word around and become a part of what might go down into history .

February 25, 2008

HOWTO: Context specific data filter using a popUp on the AdvancedDataGrid headerRenderer

Filed under: HOWTO — venomeffect @ 10:57 am

“Venom Ponders : If context weren’t that important, then man can pray for being the lone male in a world full of women and God can give him that pleasure…………………while making him a raving homosexual ”


Some of the most intriguing applications of a grid is a task planner . A task planner has the kind of functionality that can push the limits of customization we can push a grid to. One of the most important features of a task planner will be to filter the data based on some category without compromising on the oft neglected “intuitive” factor . Enter the AdvancedDataGrid.

Among the many customizable pieces of the AdvancedDataGrid, the headerRenderer should top the list . It is surprising the kind of things a person can fathom and apply with modifications here and there to the ADG header , my latest lap mate . But then again , she has has her limitations. She is not that great in accommodating three or more UIComponents . I thought I will get around to it to solve both the problems .

Code explained:

The headerRenderer here in this code sample is a modification to the existing AdvancedDataGridHeaderRenderer. She accomodates a popUpButton with a popUpMenu whose members change on the basis of the dataField of the column whose header carries it.

Two functions in particular need to be mentioned here. These being :

protected function onPopUpMouseDown(event:MouseEvent):void{…} and

protected function filterData(event:MenuEvent):void {…}

The first function provides the functionality and the dataProvider to load the PopUpMenu while the second function provides the functionality to specify the filter function. Thats it. Simple is’nt it ? Now if someone needs to provider a different functionality to the code altogether rather than specify the filter function , then these are the functions to override to get the functionality working.

P.S : I confess the code can be buggy . And yeah. The dataFields are hard coded into the set data of the headerRenderer. Dint think of a better means of getting around it . This being a prototype component you are free to modify it , steal it and sabotage it at your will to suit your requirements. She is for open stuff.

Here’s how the output of a sample program using this headerRenderer will look like :



Heres a sample application using this popUp header renderer component

You can find the source here

December 4, 2007

HOWTO: Setting a custom sortItemRenderer to the AdvancedDataGrid

Filed under: HOWTO — venomeffect @ 11:18 am

“We should all do what in the long run gives us joy, even if it means sorting the laundry ”


sortItemRenderer is one of those tiny goodies that comes with the AdvancedDataGrid package; albeit hard to miss. It is a nifty venomous utility that can be customizable according to needs.

The component by default uses the AdvancedDataGridSortItemRenderer which renders the sort feature of the header.

Sweet. But now I am in my familiar break-the-code-and-do-some-shit-on-my-own mood when I use my own headerRenderer , I lose the sort display completely !

The solution here will to write either a custom sortItemRenderer or handle the default sortItemRenderer within the headerRenderer code . Here I explain how to build a custom sortItemRenderer that can be used with any customized headerRenderer.

Code explained :

The core feature to understand here is the function getIconInfo() that returns a SortInfo object . The SortInfo object contains information which is used by the sortItemRenderer to dipslay the icon and the sequence value of the sort. ( P.S. : The order of sorting can easily be specified by accessing sequenceNumber as returned by this SortInfo object.

This function makes a call to the getFieldSortInfo method of AdvancedDataGrid to retrieve the sort information.

This example code uses two icons to display ascending/descending sort as in :

var sortIcon:Class = arrowDown ? _descendingIcon : _ascendingIcon;

A simple function flips the icon based on the SortInfo value .

The output of the program will look like this :

Custom Sort

Goodies :
Here is the link to an application that uses this custom built sortRenderer

You can find the source here

October 8, 2007

Creating Flex based mashup using Yahoo Flickr and YPipes APIs

Filed under: Generic Flex — venomeffect @ 9:46 am

Venom Ponders:

Come Yahoo Hack day and the feeling sinks in pretty bad that you are a lone warrior without any knowledge of Yahoo API implementation. But then again there is a venomous relief that creativity is not marked by an overlap with that of someone else collaborating on the same project. A couple of Red Bulls downed and after an hour of poring into the Flickr Search API and YPipes , I was redeemed by a light at the end of a tunnel which had nothing to do with the beautiful Yahoo HR seated next to me.So I pondered on looking into the blank Flex Builder screen and came up with this idea, albeit not too jazzy but a useful utility.


Create a free website or blog at WordPress.com.