Flex 3 AdvancedDataGrid Summary Divider
The AdvancedDataGrid (ADG) control in Adobe Flex 3 extends the capabilities of the standard DataGrid control to improve data visualization. You can:
- Sort by multiple columns when you click in the column header
- Use the styleFunction property to specify a function to apply styles to rows and columns of the control
- Use an expandable navigation tree in a column to control the visible rows of the control
- Collect multiple columns under a single column heading
- Span multiple columns with an item renderer and use multiple item renderers in the same column
Working in a combination of these features to create something new was fun. I wanted to create a summary row for a group, but I didn’t want any of the tree structure to be shown. More like a divider between my grouped data. Here’s the basic example:
I started out with just a simple ADG that grouped by a column. Grouped data is flat data that you arrange in a hierarchy for display.
To group data, you specify one or more data fields that collect the data into the hierarchy using the GroupingCollection class as the dataProvider for the ADG. The refresh() method applies the settings of the GroupingCollection class to the data. You must call this method any time you modify the GroupingCollection class. Since I was calling a groupingFunction to group my data, I call refresh() on initialize of the ADG.
By default, GroupLabel is the field name for the data items added to the flat data to create the hierarchy. We’ll use this for our summary row divider.
That gave me a tree structure in the display. Next I added a renderProvider
…
I’m going to go ahead an post this up, I should be able to complete the rest of the description later.






Hi Rob,
Your Summary divider is Great!
I’m looking for an evolution of AdvancedDataGrid but I’m not lucky.
Could you send me the source of your, please?
I don’t sure of the step with “renderProvider” applied to “summary row divider”.
Thanks, I hope that you’ll see this message.
Alex
Source is available from the right-click.
Hi Rob,
This is really a great example!
Carry on your good work.
Thanks,
Sunita
Hi,
Wondering if the following is feasible:
In my grouped advanceddatagrid, i would like the values in the row with Max value to appear at the group level along side the group label itself. Is this possible?
Also, clicking view source on the example above results in 404.. great if you could post the source.
Man Thanks
Hi Rob,
Great example!
Is there a way to view the source? I’m getting a 404 page when r-clicking > View Source.
Thanks!
Eugene
Sorry, changed the blog config which broke the link. The right-click should work again.
Love the example, exactly what I needed ( Ihad to search for days) One question, because of the folder Tree aspect of the grouping in advanced data grid, everything in the leftmost column is indented. Any way to get rid of that? (I set all my tree node icons to null but it still indents)
I noticed that too, but didn’t have a need to find a solution given my data set. There is an indentation property, so I’d start there.
Hi Rob,
Cant see the source when I right click it .
Also I wanted to create a Datagrid that can group and display columns like a OLAPDatagrid does but also make it editable.Any thoughts on that?
Thanks
Rahul
I just tested the “view source” and it worked for me. If you right-click on the application and select view source it loads a different page.
Hi Rob,
It works now Thanks! Can you help with the below scenario? I have a advanced data grid with some numeric columns .I am using a grouping function on say column A and I need to create subtotals rows for each group of values in column A
Thanks
Rahul
rows after each grouping
Hi,
Great work..
A small doubt how can i have a tree inside the month.
Hi
Great Work. Its Exactly what I wanted.
View Source is not working. I’m getting a 404 page. If you can post the source code it will be helpful.
Thanks
Bala
Sorry. Plugins keep interfering with some posts. It is working… again.
Many thanks for this great post !
but I’ve got some trouble : when my collection just host one record, i’m running into an exception in the renderer cause the GroupLabel has not been created.
Could you please help me to solve this problem ?
Thx
Hi, Rahul
Yes we can create subtotals rows for each group of values in column A using summary function
for e.g:
Exactly what I am looking for…
View Source is not working. I’m getting a 404 page. If you can post the source code it will be helpful.
Thank you.
Travis.
Travis,
I just checked it and seem to be working fine. You might want to try again.
Your “View Source” is still not working. I’m getting a “Easy, tiger. This is a 404 page.”
Works fine for me at home and from across the country.
Hi Rob,
Your example helped me a lot but i have a question for you i am using rowcount in my ADG as we have many columns and the summary header shows only till the rowcount and other issue i have is when we refresh the screen or data and if there is only one month in your example then header disappears. I know we have to call Refresh() but when???????
Hey Rob,
thanks for this great example, it suits almost perfectly our needs in the current project.
One question is still remaining:
I don’t want the summaryRow being selectable, how do I achieve this?
Regards
Mark
Un gran ejemplo! podrías por favor indicarme para la búsqueda de otros tópicos en advanceddatagrid?
Gracias
Could you send me the source of your, please?